Skip to main content

debug_time

Macro debug_time 

Source
macro_rules! debug_time {
    ($label:expr, $body:expr $(,)?) => { ... };
}
Expand description

Time $body and emit a debug record with the elapsed duration.

When debug is disabled the body runs without any timing instrumentation — no Instant, no string formatting — so this is safe on hot paths.