Skip to main content

delay_for

Function delay_for 

Source
pub fn delay_for(delay: Duration) -> Oneshot 
Expand description

Creates a timer that emits an event once after the given delay.

When throttling is activated (i.e. when using a non-0 wait duration in Context::acquire), timer entries are assigned to the nearest time frame, meaning that the delay might elapse wait / 2 ms earlier or later than the expected instant.

Use delay_for_at_least when it’s preferable not to return before the expected instant.