Struct fuchsia_zircon::Time
source · pub struct Time(/* private fields */);
Implementations§
source§impl Time
impl Time
pub const INFINITE: Time = _
pub const INFINITE_PAST: Time = _
pub const ZERO: Time = _
sourcepub fn get_monotonic() -> Time
pub fn get_monotonic() -> Time
Get the current monotonic time.
Wraps the zx_clock_get_monotonic 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.
sourcepub const fn into_nanos(self) -> i64
pub const fn into_nanos(self) -> i64
Returns the number of nanoseconds since the epoch contained by this Time
.
pub const fn from_nanos(nanos: i64) -> 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 PartialEq for Time
impl PartialEq for Time
source§impl PartialOrd for Time
impl PartialOrd for Time
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§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