Skip to main content

time_ns

Function time_ns 

Source
pub fn time_ns<R>(f: impl FnOnce() -> R) -> (R, u64)
Expand description

Time f, returning (result, elapsed_ns). Inlined so the surrounding loop can keep the closure body in registers.