pub struct Micros(pub u64);Expand description
Monotonic microseconds since the device epoch.
Tuple Fields§
§0: u64Implementations§
Source§impl Micros
impl Micros
Sourcepub const fn from_millis(ms: u64) -> Micros
pub const fn from_millis(ms: u64) -> Micros
Build from milliseconds.
Sourcepub const fn since(self, earlier: Micros) -> u64
pub const fn since(self, earlier: Micros) -> u64
Microseconds elapsed since earlier, saturating at zero if earlier
is in the future (a wrapped or reset counter never produces a huge
bogus interval).
Sourcepub const fn add_micros(self, micros: u64) -> Micros
pub const fn add_micros(self, micros: u64) -> Micros
This instant plus micros, saturating.
Trait Implementations§
impl Copy for Micros
impl Eq for Micros
Source§impl Ord for Micros
impl Ord for Micros
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 PartialOrd for Micros
impl PartialOrd for Micros
impl StructuralPartialEq for Micros
Auto Trait Implementations§
impl Freeze for Micros
impl RefUnwindSafe for Micros
impl Send for Micros
impl Sync for Micros
impl Unpin for Micros
impl UnsafeUnpin for Micros
impl UnwindSafe for Micros
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