| Crates.io | update_rate |
| lib.rs | update_rate |
| version | 2.0.1 |
| created_at | 2017-03-16 01:19:24.922135+00 |
| updated_at | 2020-06-09 03:19:04.624688+00 |
| description | A generic, low-overhead rate counter for FPS counters and the like. |
| homepage | |
| repository | https://github.com/NoraCodes/update_rate |
| max_upload_size | |
| id | 8992 |
| size | 17,885 |
A generic, low-overhead rate counter for frames-per-second indicators, measurement averaging, and more.
use update_rate::{RateCounter, RollingRateCounter};
let mut c = RollingRateCounter::new(10);
loop {
c.update();
mycrate.work(); // Perform the slow operation
println!("Updating at {}", c);
}