update_rate

Crates.ioupdate_rate
lib.rsupdate_rate
version2.0.1
sourcesrc
created_at2017-03-16 01:19:24.922135
updated_at2020-06-09 03:19:04.624688
descriptionA generic, low-overhead rate counter for FPS counters and the like.
homepage
repositoryhttps://github.com/NoraCodes/update_rate
max_upload_size
id8992
size17,885
Leonora Tindall (NoraCodes)

documentation

https://docs.rs/update_rate

README

update_rate

Build Status docs.rs documented available on crates.io

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); 
}
Commit count: 18

cargo fmt