Macro netstack3_base::trace_duration

source ยท
macro_rules! trace_duration {
    ($ctx:ident, $name:literal) => { ... };
}
Expand description

Convenience wrapper around the TracingContext::duration trait method.

TracingContext::duration uses RAII to begin and end the duration by tying the scope of the duration to the lifetime of the object it returns. This macro encapsulates that logic such that the trace duration will end when the scope in which the macro is called ends.