pub trait TimeSource {
// Required methods
fn now_in_walltime(&self) -> SystemTime;
fn now_in_monotonic(&self) -> Instant;
fn now(&self) -> ComplexTime;
}
Expand description
TimeSource
is a trait for providing access to both the “System” (aka “Wall”) time for
platform, as well as its monotonic time.
Required Methods§
Sourcefn now_in_walltime(&self) -> SystemTime
fn now_in_walltime(&self) -> SystemTime
Returns the current wall time.
Sourcefn now_in_monotonic(&self) -> Instant
fn now_in_monotonic(&self) -> Instant
Returns the current montonic time.
Sourcefn now(&self) -> ComplexTime
fn now(&self) -> ComplexTime
Returns the current ComplexTime (both wall and monotonic times).