File: unbounded_model.rs

package info (click to toggle)
rust-nutmeg 0.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 352 kB
  • sloc: makefile: 2
file content (12 lines) | stat: -rw-r--r-- 346 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright 2022 Martin Pool

pub fn main() {
    let progress = nutmeg::View::new(
        nutmeg::models::UnboundedModel::new("Counting raindrops"),
        nutmeg::Options::default(),
    );
    for _i in 0..=99 {
        progress.update(|model| model.increment(1));
        std::thread::sleep(std::time::Duration::from_millis(100));
    }
}