doc.rust-lang.org
primitive usize
The pointer-sized unsigned integer type.
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive unit
The () type, also called "unit".
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive u8
The 8-bit unsigned integer type.
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive u64
The 64-bit unsigned integer type.
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive u32
The 32-bit unsigned integer type.
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive u16
The 16-bit unsigned integer type.
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive u128
The 128-bit unsigned integer type.
primitive
std
Stable since 1.26.0
Version 1.100.0-nightly
doc.rust-lang.org
primitive tuple
A finite heterogeneous sequence, (T, U, ..).
primitive
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const UNIX_EPOCH: SystemTime
An anchor in time which can be used to create new SystemTime instances or learn about where in time a SystemTime lies.
constant
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn duration(&self) -> Duration
Returns the positive duration which represents how far forward the second system time was from the first.
method
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct SystemTimeError
An error returned from the duration_since and elapsed methods on SystemTime, used to learn how far in the opposite direction a system time lies.
struct
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn now() -> SystemTime
Returns the system time corresponding to "now".
associated_function
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn elapsed(&self) -> Result<Duration, SystemTimeError>
Returns the difference from this system time to the current clock time.
method
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn duration_since(&self, earlier: SystemTime) -> Result<Duration, SystemTimeError>
Returns the amount of time elapsed from an earlier point in time.
method
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn checked_sub(&self, duration: Duration) -> Option<SystemTime>
Returns Some(t) where t is the time self - duration if t can be represented as SystemTime (which means it's inside the bounds of the underlying data structure), None otherwise.
method
std
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn checked_add(&self, duration: Duration) -> Option<SystemTime>
Returns Some(t) where t is the time self + duration if t can be represented as SystemTime (which means it's inside the bounds of the underlying data structure), None otherwise.
method
std
Stable since 1.34.0
Version 1.100.0-nightly
doc.rust-lang.org
const UNIX_EPOCH: SystemTime
An anchor in time which can be used to create new SystemTime instances or learn about where in time a SystemTime lies.
associated_constant
std
Stable since 1.28.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct SystemTime
A measurement of the system clock, useful for talking to external entities like the file system or other processes.
struct
std
Stable since 1.8.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn saturating_duration_since(&self, earlier: Instant) -> Duration
Returns the amount of time elapsed from another instant to this one, or zero duration if that instant is later than this one.
method
std
Stable since 1.39.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn now() -> Instant
Returns an instant corresponding to "now".
associated_function
std
Stable since 1.8.0
Version 1.100.0-nightly