Struct native_timer::Timer
source · pub struct Timer<'h> { /* private fields */ }Expand description
Represents an instance of scheduled timer for a specific task.
Timer instance owns1 the space for the task’s closure. So when the timer is out of scope, it is forced to stop and
destroy the closure during Drop processing.
However,
TimerQueue::fire_onshotdoes not createTimerinstance. That’s why the function need a'staticclosure lifetime. ↩