| 1 |
use std::thread; |
| 2 |
use std::time::Duration; |
| 3 |
|
| 4 |
use indicatif::ProgressBar; |
| 5 |
|
| 6 |
fn main() { |
| 7 |
let pb = ProgressBar::new(1024); |
| 8 |
for _ in 0..1024 { |
| 9 |
thread::sleep(Duration::from_millis(5)); |
| 10 |
pb.inc(1); |
| 11 |
} |
| 12 |
pb.finish_with_message("done"); |
| 13 |
} |