pub struct SystemInstant(/* private fields */);std only.Expand description
๐
std
A measurement of a monotonically nondecreasing clock.
๐phys/time/source re-exported from std::time ::Instant as SystemInstant
๐
A measurement of a monotonically nondecreasing clock.
Opaque and useful only with Duration.
Instants are always guaranteed, barring platform bugs, to be no less than any previously measured instant when created, and are often useful for tasks such as measuring benchmarks or timing how long an operation takes.
Note, however, that instants are not guaranteed to be steady. In other words, each tick of the underlying clock might not be the same length (e.g. some seconds may be longer than others). An instant may jump forwards or experience time dilation (slow down or speed up), but it will never go backwards. As part of this non-guarantee it is also not specified whether system suspends count as elapsed time or not. The behavior varies across platforms and Rust versions.
Instants are opaque types that can only be compared to one another. There is no method to get โthe number of secondsโ from an instant. Instead, it only allows measuring the duration between two instants (or comparing two instants).
The size of an Instant struct may vary depending on the target operating
system.
Example:
use std::time::{Duration, Instant};
use std::thread::sleep;
fn main() {
let now = Instant::now();
// we sleep for 2 seconds
sleep(Duration::new(2, 0));
// it prints '2'
println!("{}", now.elapsed().as_secs());
}ยงOS-specific behaviors
An Instant is a wrapper around system-specific types and it may behave
differently depending on the underlying operating system. For example,
the following snippet is fine on Linux but panics on macOS:
use std::time::{Instant, Duration};
let now = Instant::now();
let days_per_10_millennia = 365_2425;
let solar_seconds_per_day = 60 * 60 * 24;
let millennium_in_solar_seconds = 31_556_952_000;
assert_eq!(millennium_in_solar_seconds, days_per_10_millennia * solar_seconds_per_day / 10);
let duration = Duration::new(millennium_in_solar_seconds, 0);
println!("{:?}", now + duration);For cross-platform code, you can comfortably use durations of up to around one hundred years.
ยงUnderlying System calls
The following system calls are currently being used by now() to find out
the current time:
| Platform | System call |
|---|---|
| SGX | insecure_time usercall. More information on timekeeping in SGX |
| UNIX | clock_gettime with CLOCK_MONOTONIC |
| WASI | clock_gettime with CLOCK_MONOTONIC |
| Darwin | clock_gettime with CLOCK_UPTIME_RAW |
| VXWorks | clock_gettime with CLOCK_MONOTONIC |
| SOLID | get_tim |
| Windows | QueryPerformanceCounter |
Disclaimer: These system calls might change over time.
Note: mathematical operations like
addmay panic if the underlying structure cannot represent the new point in time.
ยงMonotonicity
On all platforms Instant will try to use an OS API that guarantees monotonic behavior
if available, which is the case for all tier 1 platforms.
In practice such guarantees are โ under rare circumstances โ broken by hardware, virtualization
or operating system bugs. To work around these bugs and platforms not offering monotonic clocks
duration_since, elapsed and sub saturate to zero. In older
Rust versions this lead to a panic instead. checked_duration_since can be used to detect and
handle situations where monotonicity is violated, or Instants are subtracted in the wrong order.
This workaround obscures programming errors where earlier and later instants are accidentally swapped. For this reason future Rust versions may reintroduce panics.
Implementationsยง
Sourceยงimpl Instant
impl Instant
1.8.0 ยท Sourcepub fn now() -> Instant
pub fn now() -> Instant
Returns an instant corresponding to โnowโ.
ยงExamples
use std::time::Instant;
let now = Instant::now();1.8.0 ยท Sourcepub fn duration_since(&self, earlier: Instant) -> Duration
pub fn 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.
ยงPanics
Previous Rust versions panicked when earlier was later than self. Currently this
method saturates. Future versions may reintroduce the panic in some circumstances.
See Monotonicity.
ยงExamples
use std::time::{Duration, Instant};
use std::thread::sleep;
let now = Instant::now();
sleep(Duration::new(1, 0));
let new_now = Instant::now();
println!("{:?}", new_now.duration_since(now));
println!("{:?}", now.duration_since(new_now)); // 0ns1.39.0 ยท Sourcepub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration> โ
pub fn checked_duration_since(&self, earlier: Instant) -> Option<Duration> โ
Returns the amount of time elapsed from another instant to this one, or None if that instant is later than this one.
Due to monotonicity bugs, even under correct logical ordering of the passed Instants,
this method can return None.
ยงExamples
use std::time::{Duration, Instant};
use std::thread::sleep;
let now = Instant::now();
sleep(Duration::new(1, 0));
let new_now = Instant::now();
println!("{:?}", new_now.checked_duration_since(now));
println!("{:?}", now.checked_duration_since(new_now)); // None1.39.0 ยท Sourcepub fn saturating_duration_since(&self, earlier: Instant) -> Duration
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.
ยงExamples
use std::time::{Duration, Instant};
use std::thread::sleep;
let now = Instant::now();
sleep(Duration::new(1, 0));
let new_now = Instant::now();
println!("{:?}", new_now.saturating_duration_since(now));
println!("{:?}", now.saturating_duration_since(new_now)); // 0ns1.8.0 ยท Sourcepub fn elapsed(&self) -> Duration
pub fn elapsed(&self) -> Duration
Returns the amount of time elapsed since this instant.
ยงPanics
Previous Rust versions panicked when the current time was earlier than self. Currently this method returns a Duration of zero in that case. Future versions may reintroduce the panic. See Monotonicity.
ยงExamples
use std::thread::sleep;
use std::time::{Duration, Instant};
let instant = Instant::now();
let three_secs = Duration::from_secs(3);
sleep(three_secs);
assert!(instant.elapsed() >= three_secs);Trait Implementationsยง
1.8.0 ยท Sourceยงimpl Add<Duration> for Instant
impl Add<Duration> for Instant
Sourceยงimpl Add<TimeDelta> for SystemInstant
Shifts Instant forward or backward.
impl Add<TimeDelta> for SystemInstant
Shifts Instant forward or backward.
1.9.0 ยท Sourceยงimpl AddAssign<Duration> for Instant
impl AddAssign<Duration> for Instant
Sourceยงfn add_assign(&mut self, other: Duration)
fn add_assign(&mut self, other: Duration)
+= operation. Read moreSourceยงimpl BitSized<128> for SystemInstant
impl BitSized<128> for SystemInstant
Sourceยงconst BIT_SIZE: usize = _
const BIT_SIZE: usize = _
Sourceยงconst MIN_BYTE_SIZE: usize = _
const MIN_BYTE_SIZE: usize = _
Sourceยงfn bit_size(&self) -> usize
fn bit_size(&self) -> usize
Sourceยงfn min_byte_size(&self) -> usize
fn min_byte_size(&self) -> usize
impl Copy for Instant
impl Eq for Instant
1.8.0 ยท Sourceยงimpl Ord for Instant
impl Ord for Instant
1.21.0 (const: unstable) ยท Sourceยงfn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.8.0 ยท Sourceยงimpl PartialEq for Instant
impl PartialEq for Instant
1.8.0 ยท Sourceยงimpl PartialOrd for Instant
impl PartialOrd for Instant
impl StructuralPartialEq for Instant
1.8.0 ยท Sourceยงimpl Sub for Instant
impl Sub for Instant
Sourceยงfn sub(self, other: Instant) -> Duration
fn sub(self, other: 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.
ยงPanics
Previous Rust versions panicked when other was later than self. Currently this
method saturates. Future versions may reintroduce the panic in some circumstances.
See Monotonicity.
Sourceยงimpl Sub<Instant> for TimeDelta
Returns a signed TimeDelta.
impl Sub<Instant> for TimeDelta
Returns a signed TimeDelta.
Sourceยงfn sub(self, rhs: SystemInstant) -> SystemInstant
fn sub(self, rhs: SystemInstant) -> SystemInstant
- operation. Read moreSourceยงimpl Sub<TimeDelta> for SystemInstant
Moves Instant backward or forward.
impl Sub<TimeDelta> for SystemInstant
Moves Instant backward or forward.
1.9.0 ยท Sourceยงimpl SubAssign<Duration> for Instant
impl SubAssign<Duration> for Instant
Sourceยงfn sub_assign(&mut self, other: Duration)
fn sub_assign(&mut self, other: Duration)
-= operation. Read moreSourceยงimpl TimePoint for SystemInstant
impl TimePoint for SystemInstant
Sourceยงfn time_elapsed_checked(later: Self, earlier: Self) -> Option<Self::Elapsed> โ
fn time_elapsed_checked(later: Self, earlier: Self) -> Option<Self::Elapsed> โ
earlier to later,
or None if it is not valid or not representable.Sourceยงfn time_elapsed(later: Self, earlier: Self) -> Self::Elapsed
fn time_elapsed(later: Self, earlier: Self) -> Self::Elapsed
Sourceยงimpl TimeSource<Instant> for SystemInstant
impl TimeSource<Instant> for SystemInstant
Sourceยงfn time_is_monotonic() -> bool
fn time_is_monotonic() -> bool
Sourceยงfn time_is_absolute() -> bool
fn time_is_absolute() -> bool
Sourceยงfn time_scale() -> TimeScale
fn time_scale() -> TimeScale
time_point_value
and time_elapsed_value.Sourceยงfn time_now() -> SystemInstant
fn time_now() -> SystemInstant
P.Sourceยงfn time_point_value(point: SystemInstant) -> u64
fn time_point_value(point: SystemInstant) -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_value(elapsed: Duration) -> u64
fn time_elapsed_value(elapsed: Duration) -> u64
u64 value in time_scale units.Sourceยงfn time_now_value() -> u64
fn time_now_value() -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_since(point: P) -> P::Elapsed
fn time_elapsed_since(point: P) -> P::Elapsed
point to now.Sourceยงfn time_elapsed_since_checked(point: P) -> Option<P::Elapsed> โ
fn time_elapsed_since_checked(point: P) -> Option<P::Elapsed> โ
point to now,
or None if it is not valid or not representable.Sourceยงfn time_elapsed_since_value(point: P) -> u64
fn time_elapsed_since_value(point: P) -> u64
Sourceยงfn time_point_seconds(point: P) -> u64
fn time_point_seconds(point: P) -> u64
point to seconds.Sourceยงfn time_point_millis(point: P) -> u64
fn time_point_millis(point: P) -> u64
point to milliseconds.Sourceยงfn time_point_micros(point: P) -> u64
fn time_point_micros(point: P) -> u64
point to microseconds.Sourceยงfn time_point_nanos(point: P) -> u64
fn time_point_nanos(point: P) -> u64
point to nanoseconds.Sourceยงfn time_elapsed_seconds(elapsed: P::Elapsed) -> u64
fn time_elapsed_seconds(elapsed: P::Elapsed) -> u64
elapsed to seconds.Sourceยงfn time_elapsed_millis(elapsed: P::Elapsed) -> u64
fn time_elapsed_millis(elapsed: P::Elapsed) -> u64
elapsed to milliseconds.Sourceยงfn time_elapsed_micros(elapsed: P::Elapsed) -> u64
fn time_elapsed_micros(elapsed: P::Elapsed) -> u64
elapsed to microseconds.Sourceยงfn time_elapsed_nanos(elapsed: P::Elapsed) -> u64
fn time_elapsed_nanos(elapsed: P::Elapsed) -> u64
elapsed to nanoseconds.Sourceยงfn time_now_seconds() -> u64
fn time_now_seconds() -> u64
Sourceยงfn time_now_millis() -> u64
fn time_now_millis() -> u64
Sourceยงfn time_now_micros() -> u64
fn time_now_micros() -> u64
Sourceยงfn time_now_nanos() -> u64
fn time_now_nanos() -> u64
Sourceยงfn time_now_millis_f64() -> f64
fn time_now_millis_f64() -> f64
f64.Sourceยงimpl TimeSource<u32> for SystemInstant
Process-local monotonic u32 projection of SystemInstant in microseconds.
impl TimeSource<u32> for SystemInstant
Process-local monotonic u32 projection of SystemInstant in microseconds.
This compact projection trades range for storage size while keeping sub-millisecond precision useful for short and medium-lived runtimes.
At microsecond resolution, u32 spans about 71.6 minutes,
Sourceยงfn time_is_monotonic() -> bool
fn time_is_monotonic() -> bool
Sourceยงfn time_is_absolute() -> bool
fn time_is_absolute() -> bool
Sourceยงfn time_scale() -> TimeScale
fn time_scale() -> TimeScale
time_point_value
and time_elapsed_value.Sourceยงfn time_point_value(point: u32) -> u64
fn time_point_value(point: u32) -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_value(elapsed: u32) -> u64
fn time_elapsed_value(elapsed: u32) -> u64
u64 value in time_scale units.Sourceยงfn time_now_value() -> u64
fn time_now_value() -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_since(point: P) -> P::Elapsed
fn time_elapsed_since(point: P) -> P::Elapsed
point to now.Sourceยงfn time_elapsed_since_checked(point: P) -> Option<P::Elapsed> โ
fn time_elapsed_since_checked(point: P) -> Option<P::Elapsed> โ
point to now,
or None if it is not valid or not representable.Sourceยงfn time_elapsed_since_value(point: P) -> u64
fn time_elapsed_since_value(point: P) -> u64
Sourceยงfn time_point_seconds(point: P) -> u64
fn time_point_seconds(point: P) -> u64
point to seconds.Sourceยงfn time_point_millis(point: P) -> u64
fn time_point_millis(point: P) -> u64
point to milliseconds.Sourceยงfn time_point_micros(point: P) -> u64
fn time_point_micros(point: P) -> u64
point to microseconds.Sourceยงfn time_point_nanos(point: P) -> u64
fn time_point_nanos(point: P) -> u64
point to nanoseconds.Sourceยงfn time_elapsed_seconds(elapsed: P::Elapsed) -> u64
fn time_elapsed_seconds(elapsed: P::Elapsed) -> u64
elapsed to seconds.Sourceยงfn time_elapsed_millis(elapsed: P::Elapsed) -> u64
fn time_elapsed_millis(elapsed: P::Elapsed) -> u64
elapsed to milliseconds.Sourceยงfn time_elapsed_micros(elapsed: P::Elapsed) -> u64
fn time_elapsed_micros(elapsed: P::Elapsed) -> u64
elapsed to microseconds.Sourceยงfn time_elapsed_nanos(elapsed: P::Elapsed) -> u64
fn time_elapsed_nanos(elapsed: P::Elapsed) -> u64
elapsed to nanoseconds.Sourceยงfn time_now_seconds() -> u64
fn time_now_seconds() -> u64
Sourceยงfn time_now_millis() -> u64
fn time_now_millis() -> u64
Sourceยงfn time_now_micros() -> u64
fn time_now_micros() -> u64
Sourceยงfn time_now_nanos() -> u64
fn time_now_nanos() -> u64
Sourceยงfn time_now_millis_f64() -> f64
fn time_now_millis_f64() -> f64
f64.Sourceยงimpl TimeSource<u64> for SystemInstant
Process-local monotonic u64 projection of SystemInstant in nanoseconds.
impl TimeSource<u64> for SystemInstant
Process-local monotonic u64 projection of SystemInstant in nanoseconds.
This is the canonical wide numeric projection:
At nanosecond resolution, u64 spans about 584 years.
Sourceยงfn time_is_monotonic() -> bool
fn time_is_monotonic() -> bool
Sourceยงfn time_is_absolute() -> bool
fn time_is_absolute() -> bool
Sourceยงfn time_scale() -> TimeScale
fn time_scale() -> TimeScale
time_point_value
and time_elapsed_value.Sourceยงfn time_point_value(point: u64) -> u64
fn time_point_value(point: u64) -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_value(elapsed: u64) -> u64
fn time_elapsed_value(elapsed: u64) -> u64
u64 value in time_scale units.Sourceยงfn time_now_value() -> u64
fn time_now_value() -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_since(point: P) -> P::Elapsed
fn time_elapsed_since(point: P) -> P::Elapsed
point to now.Sourceยงfn time_elapsed_since_checked(point: P) -> Option<P::Elapsed> โ
fn time_elapsed_since_checked(point: P) -> Option<P::Elapsed> โ
point to now,
or None if it is not valid or not representable.Sourceยงfn time_elapsed_since_value(point: P) -> u64
fn time_elapsed_since_value(point: P) -> u64
Sourceยงfn time_point_seconds(point: P) -> u64
fn time_point_seconds(point: P) -> u64
point to seconds.Sourceยงfn time_point_millis(point: P) -> u64
fn time_point_millis(point: P) -> u64
point to milliseconds.Sourceยงfn time_point_micros(point: P) -> u64
fn time_point_micros(point: P) -> u64
point to microseconds.Sourceยงfn time_point_nanos(point: P) -> u64
fn time_point_nanos(point: P) -> u64
point to nanoseconds.Sourceยงfn time_elapsed_seconds(elapsed: P::Elapsed) -> u64
fn time_elapsed_seconds(elapsed: P::Elapsed) -> u64
elapsed to seconds.Sourceยงfn time_elapsed_millis(elapsed: P::Elapsed) -> u64
fn time_elapsed_millis(elapsed: P::Elapsed) -> u64
elapsed to milliseconds.Sourceยงfn time_elapsed_micros(elapsed: P::Elapsed) -> u64
fn time_elapsed_micros(elapsed: P::Elapsed) -> u64
elapsed to microseconds.Sourceยงfn time_elapsed_nanos(elapsed: P::Elapsed) -> u64
fn time_elapsed_nanos(elapsed: P::Elapsed) -> u64
elapsed to nanoseconds.Sourceยงfn time_now_seconds() -> u64
fn time_now_seconds() -> u64
Sourceยงfn time_now_millis() -> u64
fn time_now_millis() -> u64
Sourceยงfn time_now_micros() -> u64
fn time_now_micros() -> u64
Sourceยงfn time_now_nanos() -> u64
fn time_now_nanos() -> u64
Sourceยงfn time_now_millis_f64() -> f64
fn time_now_millis_f64() -> f64
f64.Auto Trait Implementationsยง
impl Freeze for Instant
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnsafeUnpin for Instant
impl UnwindSafe for Instant
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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
Sourceยงimpl<T> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
ยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.Sourceยงimpl<T, R> Morph<R> for Twhere
T: ?Sized,
impl<T, R> Morph<R> for Twhere
T: ?Sized,
Sourceยงimpl<T, P> TimeSourceCfg<P> for Twhere
T: TimeSource<P>,
P: TimePoint,
impl<T, P> TimeSourceCfg<P> for Twhere
T: TimeSource<P>,
P: TimePoint,
Sourceยงfn time_is_monotonic(_: ()) -> bool
fn time_is_monotonic(_: ()) -> bool
Sourceยงfn time_is_absolute(_: ()) -> bool
fn time_is_absolute(_: ()) -> bool
Sourceยงfn time_scale(_: ()) -> TimeScale
fn time_scale(_: ()) -> TimeScale
time_point_value and time_elapsed_value.Sourceยงfn time_point_value(_: (), point: P) -> u64
fn time_point_value(_: (), point: P) -> u64
u64 value in time_scale(cfg) units.Sourceยงfn time_elapsed_value(_: (), elapsed: <P as TimePoint>::Elapsed) -> u64
fn time_elapsed_value(_: (), elapsed: <P as TimePoint>::Elapsed) -> u64
u64 value in time_scale(cfg) units.Sourceยงfn time_now_millis(_: ()) -> u64
fn time_now_millis(_: ()) -> u64
Sourceยงfn time_now_micros(_: ()) -> u64
fn time_now_micros(_: ()) -> u64
Sourceยงfn time_now_nanos(_: ()) -> u64
fn time_now_nanos(_: ()) -> u64
Sourceยงfn time_now_millis_f64(_: ()) -> f64
fn time_now_millis_f64(_: ()) -> f64
f64.Sourceยงfn time_now_value(cfg: Self::Config) -> u64
fn time_now_value(cfg: Self::Config) -> u64
u64 value in time_scale units.Sourceยงfn time_elapsed_since(cfg: Self::Config, point: P) -> P::Elapsed
fn time_elapsed_since(cfg: Self::Config, point: P) -> P::Elapsed
point to now.Sourceยงfn time_elapsed_since_checked(cfg: Self::Config, point: P) -> Option<P::Elapsed> โ
fn time_elapsed_since_checked(cfg: Self::Config, point: P) -> Option<P::Elapsed> โ
point to now,
or None if it is not valid or not representable.Sourceยงfn time_elapsed_since_value(cfg: Self::Config, point: P) -> u64
fn time_elapsed_since_value(cfg: Self::Config, point: P) -> u64
Sourceยงfn time_point_seconds(cfg: Self::Config, point: P) -> u64
fn time_point_seconds(cfg: Self::Config, point: P) -> u64
point to seconds.Sourceยงfn time_point_millis(cfg: Self::Config, point: P) -> u64
fn time_point_millis(cfg: Self::Config, point: P) -> u64
point to milliseconds.Sourceยงfn time_point_micros(cfg: Self::Config, point: P) -> u64
fn time_point_micros(cfg: Self::Config, point: P) -> u64
point to microseconds.Sourceยงfn time_point_nanos(cfg: Self::Config, point: P) -> u64
fn time_point_nanos(cfg: Self::Config, point: P) -> u64
point to nanoseconds.Sourceยงfn time_elapsed_seconds(cfg: Self::Config, elapsed: P::Elapsed) -> u64
fn time_elapsed_seconds(cfg: Self::Config, elapsed: P::Elapsed) -> u64
elapsed to seconds.Sourceยงfn time_elapsed_millis(cfg: Self::Config, elapsed: P::Elapsed) -> u64
fn time_elapsed_millis(cfg: Self::Config, elapsed: P::Elapsed) -> u64
elapsed to milliseconds.Sourceยงfn time_elapsed_micros(cfg: Self::Config, elapsed: P::Elapsed) -> u64
fn time_elapsed_micros(cfg: Self::Config, elapsed: P::Elapsed) -> u64
elapsed to microseconds.Sourceยงfn time_elapsed_nanos(cfg: Self::Config, elapsed: P::Elapsed) -> u64
fn time_elapsed_nanos(cfg: Self::Config, elapsed: P::Elapsed) -> u64
elapsed to nanoseconds.