fn time<F: FnOnce() -> R, R>(activity: &str, op: F) -> R {
    let start = Instant::now();
    let result = op();
    let took = Instant::now() - start;
    println!("{}: {}ms", activity, (took * 1000).as_secs());
    result
}
/// Take note of how long it takes to parse.
Take note of how long it takes to parse.
Take note of how long it takes to parse .
fn time<F: FnOnce() -> R, R>(activity: &str, op: F) -> R {
    let start = Instant::now();
    let result = op();
    let took = Instant::now() - start;
    println!("{}: {}ms", activity, (took * 1000).as_secs());
    result
}
fn time < F : FnOnce ( ) -> R , R > ( activity : & str , op : F ) -> R { let start = Instant :: now ( ) ; let result = op ( ) ; let took = Instant :: now ( ) - start ; println ! ( " " activity ( took 1000 ) as_secs ( ) ) ; result }
Take note of how long it takes to parse.
Take note of how long it takes to parse .
activity
&str
op
F
activity
&str
op
F