pub type BootInstant = Instant<BootTimeline>;
Expand description
A timestamp from the boot clock. Advances while the system is suspended.
Aliased Type§
struct BootInstant(/* private fields */);
Implementations§
Source§impl BootInstant
impl BootInstant
Sourcepub fn after(duration: BootDuration) -> Self
pub fn after(duration: BootDuration) -> Self
Compute a deadline for the time in the future that is the given Duration
away.
Source§impl<T: Timeline> Instant<T>
impl<T: Timeline> Instant<T>
pub const INFINITE: Instant<T, NsUnit>
pub const INFINITE_PAST: Instant<T, NsUnit>
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
.
Sourcepub const fn from_nanos(nanos: i64) -> Self
pub const fn from_nanos(nanos: i64) -> Self
Return a strongly-typed Time
from a raw number of nanoseconds.
Trait Implementations
Source§impl<T: Timeline, U: TimeUnit> AddAssign<Duration<T, U>> for Instant<T, U>
impl<T: Timeline, U: TimeUnit> AddAssign<Duration<T, U>> for Instant<T, U>
Source§fn add_assign(&mut self, dur: Duration<T, U>)
fn add_assign(&mut self, dur: Duration<T, U>)
Performs the
+=
operation. Read moreSource§impl<T, U> FromBytes for Instant<T, U>
impl<T, U> FromBytes for Instant<T, U>
Source§impl<T, U> IntoBytes for Instant<T, U>
impl<T, U> IntoBytes for Instant<T, U>
§fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
fn as_mut_bytes(&mut self) -> &mut [u8] ⓘwhere
Self: FromBytes,
Gets the bytes of this value mutably. Read more
§fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
fn write_to(&self, dst: &mut [u8]) -> Result<(), SizeError<&Self, &mut [u8]>>where
Self: Immutable,
Source§impl<T: Ord, U: Ord> Ord for Instant<T, U>
impl<T: Ord, U: Ord> Ord for Instant<T, U>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, U: PartialOrd> PartialOrd for Instant<T, U>
impl<T: PartialOrd, U: PartialOrd> PartialOrd for Instant<T, U>
Source§impl<T: Timeline, U: TimeUnit> SubAssign<Duration<T, U>> for Instant<T, U>
impl<T: Timeline, U: TimeUnit> SubAssign<Duration<T, U>> for Instant<T, U>
Source§fn sub_assign(&mut self, dur: Duration<T, U>)
fn sub_assign(&mut self, dur: Duration<T, U>)
Performs the
-=
operation. Read more