pub type MonotonicTicks = Instant<MonotonicTimeline, TicksUnit>;
Expand description
A timestamp from system ticks on the monotonic timeline. Does not advance while the system is suspended.
Aliased Type§
struct MonotonicTicks(/* private fields */);
Implementations§
Source§impl MonotonicTicks
impl MonotonicTicks
Sourcepub fn get() -> Self
pub fn get() -> Self
Read the number of high-precision timer ticks on the monotonic timeline. These ticks may be processor cycles, high speed timer, profiling timer, etc. They do not advance while the system is suspended.
Wraps the zx_ticks_get syscall.
Trait Implementations
Source§impl<T: Timeline, U: TimeUnit> AddAssign<Duration<T, U>> for Instant<T, U>
impl<T: Timeline, U: TimeUnit> AddAssign<Duration<T, U>> for Instant<T, U>
Source§fn add_assign(&mut self, dur: Duration<T, U>)
fn add_assign(&mut self, dur: Duration<T, U>)
Performs the
+=
operation. Read moreSource§impl<T, U> FromBytes for Instant<T, U>
impl<T, U> FromBytes for Instant<T, U>
Source§impl<T, U> IntoBytes for Instant<T, U>
impl<T, U> IntoBytes for Instant<T, U>
§fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
Source§impl<T: Ord, U: Ord> Ord for Instant<T, U>
impl<T: Ord, U: Ord> Ord for Instant<T, U>
1.21.0 · 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
Source§impl<T: PartialOrd, U: PartialOrd> PartialOrd for Instant<T, U>
impl<T: PartialOrd, U: PartialOrd> PartialOrd for Instant<T, U>
Source§impl<T: Timeline, U: TimeUnit> SubAssign<Duration<T, U>> for Instant<T, U>
impl<T: Timeline, U: TimeUnit> SubAssign<Duration<T, U>> for Instant<T, U>
Source§fn sub_assign(&mut self, dur: Duration<T, U>)
fn sub_assign(&mut self, dur: Duration<T, U>)
Performs the
-=
operation. Read more