summaryrefslogtreecommitdiffstats
path: root/vendor/indicatif/examples/slow.rs
blob: 91a8e7e60715634926493e7487217fbea9307cb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use indicatif::{ProgressBar, ProgressStyle};
use std::time::Duration;

fn main() {
    let progress =
        ProgressBar::new(10).with_style(ProgressStyle::default_bar().progress_chars("🔐🔑🕓"));
    for _ in 0..10 {
        progress.inc(1);
        std::thread::sleep(Duration::from_secs(1));
    }
    progress.finish();
}