Skip to main content

Timers

Trait Timers 

Source
pub trait Timers {
    // Required methods
    fn sleep_until(&self, ticks: Ticks);
    fn sleep_for(&self, ticks: Ticks);
}
Expand description

Optional timers service (P1/P2).

Does not enter StepContext. If a node requires timers, the host should inject a handle at construction time (out-of-band), not via the context.

Required Methods§

Source

fn sleep_until(&self, ticks: Ticks)

Sleep/yield until the given tick, if supported.

Source

fn sleep_for(&self, ticks: Ticks)

Sleep/yield for the given number of ticks.

Implementors§