quanta

Function with_clock

source
pub fn with_clock<T>(clock: &Clock, f: impl FnOnce() -> T) -> T
Expand description

Sets this clock as the default for the duration of a closure.

This will only affect calls made against Instant. Clock is always self-contained.