pub struct Handle { /* private fields */ }
Expand description
A handle to the timer driver.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn sleep_for(&self, duration: Duration) -> SleepFuture ⓘ
pub fn sleep_for(&self, duration: Duration) -> SleepFuture ⓘ
Returns a future that sleeps for the specified duration.
SleepFuture
returns the duration that overly passed the specified duration.
Sourcepub fn sleep_until(&self, timeout: Instant) -> SleepFuture ⓘ
pub fn sleep_until(&self, timeout: Instant) -> SleepFuture ⓘ
Returns a future that sleeps until the specified instant.
SleepFuture
returns the duration that overly passed the specified instant.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handle
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnwindSafe for Handle
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