Function tokio_timer::timer::set_default

source ·
pub fn set_default(handle: &Handle) -> DefaultGuard<'_>
Expand description

Sets handle to default timer, returning guard that unsets it on drop.

§Panics

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