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