[−][src]Crate devtimer
Devtimer
devtimer
provides a simple way to time operations using the DevTime
struct
devtimer
and simply uses the built-in
methods available in the standard library to time operations.
Example
extern crate devtimer; use devtimer::DevTime; fn main() { let mut devtime = DevTime::new(); devtime.start(); // Do some long operation devtime.stop(); println!("The time taken for the operation was: {} nanos", devtime.time_in_nanos().unwrap()); println!("The time taken for the operation was: {} micros", devtime.time_in_micros().unwrap()); println!("The time taken for the operation was: {} millis", devtime.time_in_millis().unwrap()); println!("The time taken for the operation was: {} secs", devtime.time_in_secs().unwrap()); }
Structs
DevTime | The |