pub struct Time(/* private fields */);
Implementations§
Source§impl Time
impl Time
pub const INFINITE: Time
Sourcepub fn get(clock_id: ClockId) -> Time
pub fn get(clock_id: ClockId) -> Time
Get the current time, from the specific clock id.
Wraps the zx_time_get syscall.
Sourcepub fn after(duration: Duration) -> Time
pub fn after(duration: Duration) -> Time
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.
pub fn nanos(self) -> u64
pub fn from_nanos(nanos: u64) -> Self
Trait Implementations§
Source§impl AddAssign<Duration> for Time
impl AddAssign<Duration> for Time
Source§fn add_assign(&mut self, dur: Duration)
fn add_assign(&mut self, dur: Duration)
Performs the
+=
operation. Read moreSource§impl Ord for Time
impl Ord for Time
Source§impl PartialOrd for Time
impl PartialOrd for Time
Source§impl SubAssign<Duration> for Time
impl SubAssign<Duration> for Time
Source§fn sub_assign(&mut self, dur: Duration)
fn sub_assign(&mut self, dur: Duration)
Performs the
-=
operation. Read moreimpl Copy for Time
impl Eq for Time
impl StructuralPartialEq for Time
Auto Trait Implementations§
impl Freeze for Time
impl RefUnwindSafe for Time
impl Send for Time
impl Sync for Time
impl Unpin for Time
impl UnwindSafe for Time
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more