pub struct AwakeInstant(/* private fields */);Expand description
A point on a clock that stops while the system sleeps, so stall checks ignore suspend.
std::time::Instant already stops during sleep on Linux and macOS; on Windows this reads
QueryUnbiasedInterruptTimePrecise (100 ns units).
Implementations§
Source§impl AwakeInstant
impl AwakeInstant
Sourcepub fn duration_since(self, earlier: Self) -> Duration
pub fn duration_since(self, earlier: Self) -> Duration
Awake time since earlier, or zero when earlier is later.
Sourcepub fn checked_sub(self, duration: Duration) -> Option<Self>
pub fn checked_sub(self, duration: Duration) -> Option<Self>
The instant duration earlier, if the clock reaches back that far.
Trait Implementations§
Source§impl Clone for AwakeInstant
impl Clone for AwakeInstant
impl Copy for AwakeInstant
Source§impl Debug for AwakeInstant
impl Debug for AwakeInstant
impl Eq for AwakeInstant
Source§impl Ord for AwakeInstant
impl Ord for AwakeInstant
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for AwakeInstant
impl PartialEq for AwakeInstant
Source§impl PartialOrd for AwakeInstant
impl PartialOrd for AwakeInstant
impl StructuralPartialEq for AwakeInstant
Auto Trait Implementations§
impl Freeze for AwakeInstant
impl RefUnwindSafe for AwakeInstant
impl Send for AwakeInstant
impl Sync for AwakeInstant
impl Unpin for AwakeInstant
impl UnsafeUnpin for AwakeInstant
impl UnwindSafe for AwakeInstant
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