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.
Auto Trait Implementations§
impl Freeze for TaskDelay
impl RefUnwindSafe for TaskDelay
impl Send for TaskDelay
impl Sync for TaskDelay
impl Unpin for TaskDelay
impl UnwindSafe for TaskDelay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more