[−][src]Function eggtimer::measure
pub fn measure<F>(f: F) -> f64 where
F: FnOnce(),
Measure the amount of time the given function takes to execute
Time is measured in floating-point number of seconds
Example
use eggtimer::measure; let elapsed = measure(|| { for i in 0..1000 { println!("{}", i); } }); println!("Printing all those numbers took {} seconds", elapsed);