pub trait Clock {
// Required methods
fn get_instant(&self) -> Instant;
fn compute_system_time_from_instant(
&self,
instant: Instant,
) -> Result<DateTime<Utc>, OutOfRangeError>;
}
Required Methods§
Sourcefn get_instant(&self) -> Instant
fn get_instant(&self) -> Instant
Returns current tsc instant
Sourcefn compute_system_time_from_instant(
&self,
instant: Instant,
) -> Result<DateTime<Utc>, OutOfRangeError>
fn compute_system_time_from_instant( &self, instant: Instant, ) -> Result<DateTime<Utc>, OutOfRangeError>
Returns system time from TSC time