Updated samples/demos to show usage of hide/show time elapsed/remaining

This commit is contained in:
Pranav Srinivas Kumar
2019-12-17 09:31:43 -06:00
parent 8198d8a802
commit 6224a46371
10 changed files with 72 additions and 43 deletions

View File

@@ -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();