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
impl MonotonicInstant
sourcepub fn get() -> Self
pub fn get() -> Self
Get the current monotonic time which does not advance during system suspend.
Wraps the zx_clock_get_monotonic syscall.
sourcepub fn after(duration: MonotonicDuration) -> Self
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.
sourcepub fn sleep(self)
pub fn sleep(self)
Sleep until the given time.
Wraps the zx_nanosleep syscall.