pub struct TheWaitTimer { /* private fields */ }Expand description
The platform dependent implementation of WaitTimer. This struct is guaranteed
to have size at most 8.
Implementations§
Source§impl TheWaitTimer
impl TheWaitTimer
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new TheWaitTimer.
Sourcepub fn wait(&mut self, dur: Duration)
pub fn wait(&mut self, dur: Duration)
Sleeps for the given duration, blocking the thread. This function aims to have 1ms resolution, assuming the underlying platform allows it.
§Panics
When dur is above MAX_WAIT_DURATION.
Trait Implementations§
Source§impl Default for TheWaitTimer
impl Default for TheWaitTimer
Source§fn default() -> TheWaitTimer
fn default() -> TheWaitTimer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TheWaitTimer
impl RefUnwindSafe for TheWaitTimer
impl Send for TheWaitTimer
impl Sync for TheWaitTimer
impl Unpin for TheWaitTimer
impl UnsafeUnpin for TheWaitTimer
impl UnwindSafe for TheWaitTimer
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