Adapted to new cursor_hider api

This commit is contained in:
Bob Polis 2021-12-13 15:02:04 +01:00
parent 88811f7c81
commit 7176bfc655

View File

@ -11,7 +11,7 @@ void show_progress(const sc::term& t) {
struct timespec tm; struct timespec tm;
tm.tv_nsec = 10000000; tm.tv_nsec = 10000000;
tm.tv_sec = 0; tm.tv_sec = 0;
sc::cursor_hider ch {STDERR_FILENO}; sc::cursor_hider ch {&std::cerr};
for (int i = 0; i < 1000; ++i) { for (int i = 0; i < 1000; ++i) {
t.progress(12, "progress bar", i, 1000); t.progress(12, "progress bar", i, 1000);
nanosleep(&tm, nullptr); nanosleep(&tm, nullptr);