macro_rules! spanned {
($name: expr, $block: expr) => { ... };
}Expand description
Run a block of code inside a new span
This macro creates a new CallSite with the given name at the current
source location, and record the provided code execution by running it inside
a Span.
ยงExamples
use time_graph::spanned;
let result = spanned!("named", {
let first = 30;
let second = 12;
first + second
});
assert_eq!(result, 42);