pub trait SystemClockExt {
type SystemTime;
// Required methods
fn now_with(&self, precision: Duration) -> Self::SystemTime;
fn resolution(&self) -> Duration;
}Expand description
Extension trait for cap_std::time::SystemClock.
Required Associated Types§
Sourcetype SystemTime
type SystemTime
A system clock datapoint.
Required Methods§
Sourcefn now_with(&self, precision: Duration) -> Self::SystemTime
fn now_with(&self, precision: Duration) -> Self::SystemTime
Similar to SystemClock::now, but takes an additional precision
parameter allowing callers to inform the implementation when they
don’t need full precision. The implementation need not make any
effort to provide a time with greater precision.
Sourcefn resolution(&self) -> Duration
fn resolution(&self) -> Duration
Return the resolution of the clock.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl SystemClockExt for SystemClock
Available on non-Windows only.
impl SystemClockExt for SystemClock
Available on non-Windows only.