Type Alias zx::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.