Function tokio_timer::clock::with_default

source ·
pub fn with_default<F, R>(clock: &Clock, f: F) -> R
where F: FnOnce() -> R,
Expand description

Set the default clock for the duration of the closure.

§Panics

This function panics if there already is a default clock set.