/// Set the default clock for the duration of the closure.
///
/// # Panics
///
/// This function panics if there already is a default clock set.
Set the default clock for the duration of the closure.
Set the default clock for the duration of the closure .
pub fn with_default<F, R>(clock: &Clock, enter: &mut Enter, f: F) -> R
where
    F: FnOnce(&mut Enter) -> R,
{
    let _guard = set_default(clock);
    f(enter)
}
pub fn with_default < F , R > ( clock : & Clock , enter : & mut Enter , f : F ) -> R where F : FnOnce ( & mut Enter ) -> R , { let _guard = set_default ( clock ) ; f ( enter ) }
Set the default clock for the duration of the closure.
Set the default clock for the duration of the closure .
clock
&Clock
enter
&mut Enter
f
F
panics
This function panics if there already is a default clock set.
This function panics if there already is a default clock set .