Struct diem_time_service::real::RealTimeService
source · pub struct RealTimeService;
Expand description
The real production tokio TimeService
.
Note: RealTimeService
is just a zero-sized type whose methods only delegate
to the respective [tokio::time
] functions.
Implementations§
Trait Implementations§
source§impl Clone for RealTimeService
impl Clone for RealTimeService
source§fn clone(&self) -> RealTimeService
fn clone(&self) -> RealTimeService
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RealTimeService
impl Debug for RealTimeService
source§impl Default for RealTimeService
impl Default for RealTimeService
source§fn default() -> RealTimeService
fn default() -> RealTimeService
Returns the “default value” for a type. Read more
source§impl From<RealTimeService> for TimeService
impl From<RealTimeService> for TimeService
source§fn from(v: RealTimeService) -> TimeService
fn from(v: RealTimeService) -> TimeService
Converts to this type from the input type.
source§impl TimeServiceTrait for RealTimeService
impl TimeServiceTrait for RealTimeService
source§fn now(&self) -> Instant
fn now(&self) -> Instant
Query a monotonically nondecreasing clock. Returns an opaque type that
can only be compared to other
Instant
s, i.e., this is a monotonic
relative time whereas now_unix_time
is a
non-monotonic absolute time. Read moresource§fn sleep_blocking(&self, duration: Duration)
fn sleep_blocking(&self, duration: Duration)
Blocks the current thread until
duration
time has passed.