Adapted to new library api
This commit is contained in:
parent
ce48af695b
commit
0dc0ada006
@ -3,13 +3,13 @@
|
||||
#include <ctime>
|
||||
|
||||
int main() {
|
||||
sc::term term;
|
||||
sc::term term {STDERR_FILENO};
|
||||
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;
|
||||
sc::cursor_hider ch {STDERR_FILENO};
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
term.progress(i, 1000);
|
||||
nanosleep(&tm, nullptr);
|
||||
|
Reference in New Issue
Block a user