Throttle events and record event stats with a simple library
[Docs] (https://docs.rs/throttle-timer/0.0.4/throttle_timer/)
throttle-timer="0.0.5"
```rust use std::time::Duration;
let mut breaktimer: ThrottleTimer = ThrottleTimer::new(Duration::fromsecs(1u64), &"Break"); let dobreakflag = breaktimer.do_run();
// Timers always run when no previous runs assert!(dobreakflag); if dobreakflag { println!("timer do run flag is set to true") }
// Run flag false as no time has passed assert!(!breaktimer.dorun());
breaktimer.printstats(); // Break called 0/sec, total calls 1, has been running for 10us
```