pub struct Instant(/* private fields */);Available on crate feature
time only.Expand description
This is a replacement of Instant for real-time systems
§Platform specific behavior
- On all unixes (including macOS), this uses
clock_gettimewith CLOCK_MONOTONIC_RAW instead ofCLOCK_MONOTONICwhich Rust decided not to do and leave broken (see https://github.com/rust-lang/rust/issues/77807). - On windows, this falls back to Instant which uses the WinAPI
QueryPerformanceCounter.
Implementations§
Trait Implementations§
Source§impl Ord for Instant
impl Ord for Instant
Source§impl PartialOrd for Instant
impl PartialOrd for Instant
impl Copy for Instant
impl Eq for Instant
impl StructuralPartialEq for Instant
Auto Trait Implementations§
impl Freeze for Instant
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnwindSafe for Instant
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