Function quanta::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.