pub struct RawMonotonicClock;Available on 64-bit and crate feature
std and (Linux or macOS) only.Expand description
The monotonic clock at the hardware’s own rate: CLOCK_MONOTONIC_RAW on Linux,
CLOCK_UPTIME_RAW on macOS.
No time service adjusts its rate, which makes it the clock to measure a counter’s rate against, and a span free of a time service’s corrections. It stops while the machine sleeps.
§Examples
use t2t_clock::{Clock, RawMonotonicClock};
use t2t_core::Timedelta;
let start = RawMonotonicClock.now();
assert!(RawMonotonicClock.now() - start >= Timedelta::ZERO, "a span no slewing bends");Trait Implementations§
Source§impl Clock for RawMonotonicClock
impl Clock for RawMonotonicClock
Source§impl Clone for RawMonotonicClock
impl Clone for RawMonotonicClock
impl Copy for RawMonotonicClock
Source§impl Debug for RawMonotonicClock
impl Debug for RawMonotonicClock
Source§impl Default for RawMonotonicClock
impl Default for RawMonotonicClock
impl Eq for RawMonotonicClock
Source§impl Hash for RawMonotonicClock
impl Hash for RawMonotonicClock
Source§impl PartialEq for RawMonotonicClock
impl PartialEq for RawMonotonicClock
impl StructuralPartialEq for RawMonotonicClock
Auto Trait Implementations§
impl Freeze for RawMonotonicClock
impl RefUnwindSafe for RawMonotonicClock
impl Send for RawMonotonicClock
impl Sync for RawMonotonicClock
impl Unpin for RawMonotonicClock
impl UnsafeUnpin for RawMonotonicClock
impl UnwindSafe for RawMonotonicClock
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