rust-throttle_timer

Throttle events and record event stats with a simple library

Build Status Coverage Status

```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()); ```