macro_rules! timer {
    ($name:expr) => { ... };
    ($level:expr; $name:expr) => { ... };
    ($name:expr, $format:tt) => { ... };
    ($level:expr; $name:expr, $format:tt) => { ... };
    ($name:expr, $format:tt, $($arg:expr),*) => { ... };
    ($level:expr; $name:expr, $format:tt, $($arg:expr),*) => { ... };
}
Expand description

Creates a timer that does not log a starting message, only a finished one.

Examples

Note that when specifying the log level you must use a semi-colon as a separator, this is to ensure disambiguous parsing of the macro arguments.


use logging_timer::{stime, time, stimer, timer, Level};

let _tmr1 = timer!("FIND_FILES");
let _tmr2 = timer!(Level::Info; "FIND_FILES");
let _tmr3 = timer!("FIND_FILES", "Found {} files", 42);
let _tmr4 = timer!(Level::Trace; "FIND_FILES", "Found {} files", 42);