mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-12 17:58:55 +08:00
Updated samples/demos to show usage of hide/show time elapsed/remaining
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#include <chrono>
|
||||
#include <indicators/progress_bar.hpp>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
|
||||
int main() {
|
||||
indicators::ProgressBar bar;
|
||||
|
||||
|
||||
// Configure the bar
|
||||
bar.set_bar_width(50);
|
||||
bar.start_bar_with("[");
|
||||
@@ -13,8 +13,10 @@ int main() {
|
||||
bar.fill_bar_remainder_with(" ");
|
||||
bar.end_bar_with("]");
|
||||
bar.set_postfix_text("Getting started");
|
||||
bar.set_foreground_color(indicators::Color::GREEN);
|
||||
|
||||
bar.set_foreground_color(indicators::Color::GREEN);
|
||||
bar.hide_elapsed_time();
|
||||
bar.hide_remaining_time();
|
||||
|
||||
// Update bar state
|
||||
while (true) {
|
||||
bar.tick();
|
||||
|
||||
Reference in New Issue
Block a user