Added use of new iomanip to clear line

This commit is contained in:
Bob Polis 2022-11-01 09:57:05 +01:00
parent b51d0e3ffc
commit ee0ee06108

View File

@ -16,8 +16,8 @@ void show_progress(const sc::term& t) {
t.progress(12, "progress bar", i, 1000); t.progress(12, "progress bar", i, 1000);
nanosleep(&tm, nullptr); nanosleep(&tm, nullptr);
} }
std::cerr << '\r' << std::string(t.cols(), ' '); std::cerr << sc::io::clear_line(t);
std::cerr << "\rprogress bar done."; std::cerr << "progress bar done.";
std::cerr << std::endl; std::cerr << std::endl;
} }