zx

Type Alias Ticks

Source
pub type Ticks<T> = Instant<T, TicksUnit>;
Expand description

A timestamp from system ticks. Has an arbitrary unit that can be measured with Ticks::per_second().

Aliased Type§

struct Ticks<T>(/* private fields */);

Implementations§

Source§

impl<T: Timeline> Ticks<T>

Source

pub const fn into_raw(self) -> i64

Return the number of ticks contained by this Ticks.

Source

pub const fn from_raw(raw: i64) -> Self

Return a strongly-typed Ticks from a raw number of system ticks.

Source

pub fn per_second() -> i64

Return the number of high-precision timer ticks in a second.

Wraps the zx_ticks_per_second syscall.