pub struct TaskDelay { /* private fields */ }Expand description
Delay the current task by the given duration, minus the time that was spent processing the last wakeup loop.
Implementations§
Source§impl TaskDelay
impl TaskDelay
Sourcepub fn new() -> TaskDelay
pub fn new() -> TaskDelay
Create a new helper, marking the current time as the start of the next measurement.
Sourcepub fn delay_until<D: DurationTicks>(&mut self, delay: D)
pub fn delay_until<D: DurationTicks>(&mut self, delay: D)
Delay the execution of the current task by the given duration, minus the time spent in this task since the last delay.