18 lines
385 B
C++
18 lines
385 B
C++
|
#include <iostream>
|
||
|
#include <libscterm.hpp>
|
||
|
#include <ctime>
|
||
|
|
||
|
int main() {
|
||
|
sc::term term;
|
||
|
std::cout << term.rows() << " rows, " << term.cols() << " cols\n";
|
||
|
sleep(1);
|
||
|
struct timespec tm;
|
||
|
tm.tv_nsec = 20000000;
|
||
|
tm.tv_sec = 0;
|
||
|
sc::cursor_hider ch;
|
||
|
for (int i = 0; i < 1000; ++i) {
|
||
|
term.progress(i, 1000);
|
||
|
nanosleep(&tm, nullptr);
|
||
|
}
|
||
|
}
|