pub struct Timer { /* private fields */ }Implementations§
Source§impl Timer
impl Timer
pub fn new_millis(duration_millis: i64) -> Self
pub fn expired(&self) -> bool
pub fn elapsed_millis(&self) -> i64
Sourcepub fn sleep_or_expire(&self, duration_millis: i64)
pub fn sleep_or_expire(&self, duration_millis: i64)
sleep for max of duration_millis and target time.
Auto Trait Implementations§
impl Forget for Timer
impl Freeze for Timer
impl Move for Timer
impl RefUnwindSafe for Timer
impl Send for Timer
impl Sync for Timer
impl Unpin for Timer
impl UnsafeUnpin for Timer
impl UnwindSafe for Timer
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