A generic, low-overhead rate counter for frames-per-second indicators,
measurement averaging, and more.
useupdate_rate::{RateCounter, RollingRateCounter};letmut c =RollingRateCounter::new(10);loop{
c.update();
mycrate.work();// Perform the slow operation
println!("Updating at {}", c);}