File: linear_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 (13 lines) | stat: -rw-r--r-- 373 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2022 Martin Pool

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