[][src]Macro stratus::time_scope

macro_rules! time_scope {
    ($x:expr) => { ... };
    ($label:expr, $x:expr) => { ... };
}

Times the scope passed to the macro, either with or without a label. When everything passed to this scope has executed the amount of time it took will be printed

Example:

time_scope!(println!("hello!"));
time_scope!({
    for i in 0..1000 {
        println!("{}", i);
    }
});
time_scope!("print something", println!("hello!"));