timer_interval_guarded

Macro timer_interval_guarded 

Source
macro_rules! timer_interval_guarded {
    (
        $slot:path,
        $init_delay:expr,
        $init_func:path $(, $($init_args:tt)*)?
        ;
        $interval:expr,
        $tick_func:path $(, $($tick_args:tt)*)?
    ) => { ... };
}
Expand description

timer_interval_guarded Schedule an init timer that installs a repeating timer for the slot. Returns true when a new timer was scheduled.

§Examples

  • timer_interval_guarded!(MY_TIMER, Duration::ZERO, init_task; Duration::from_secs(60), tick);
  • timer_interval_guarded!(MY_TIMER, Duration::from_secs(2), init; Duration::from_secs(10), tick, state.clone());