zx

Type Alias MonotonicInstant

Source
pub type MonotonicInstant = Instant<MonotonicTimeline, NsUnit>;
Expand description

A timestamp from the monontonic clock. Does not advance while the system is suspended.

Aliased Type§

struct MonotonicInstant(/* private fields */);

Implementations§

Source§

impl MonotonicInstant

Source

pub fn get() -> Self

Get the current monotonic time which does not advance during system suspend.

Wraps the zx_clock_get_monotonic syscall.

Source

pub fn after(duration: MonotonicDuration) -> Self

Compute a deadline for the time in the future that is the given Duration away.

Wraps the zx_deadline_after syscall.

Source

pub fn sleep(self)

Sleep until the given time.

Wraps the zx_nanosleep syscall.