https://github.com/noracodes/update_rate
A generic, low-overhead update rate counter for FPS counters and the like
https://github.com/noracodes/update_rate
Last synced: over 1 year ago
JSON representation
A generic, low-overhead update rate counter for FPS counters and the like
- Host: GitHub
- URL: https://github.com/noracodes/update_rate
- Owner: NoraCodes
- Created: 2017-03-16T01:01:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-26T14:17:45.000Z (over 3 years ago)
- Last Synced: 2025-04-10T07:57:24.847Z (over 1 year ago)
- Language: Rust
- Size: 16.6 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# update_rate
[](https://travis-ci.org/NoraCodes/update_rate)
[](https://docs.rs/update_rate/)
[](https://crates.io/crates/update_rate/)
A generic, low-overhead rate counter for frames-per-second indicators,
measurement averaging, and more.
```rust
use update_rate::{RateCounter, RollingRateCounter};
let mut c = RollingRateCounter::new(10);
loop {
c.update();
mycrate.work(); // Perform the slow operation
println!("Updating at {}", c);
}
```