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.source§impl TryInto<RealTimeService> for TimeService
impl TryInto<RealTimeService> for TimeService
impl Copy for RealTimeService
Auto Trait Implementations§
impl RefUnwindSafe for RealTimeService
impl Send for RealTimeService
impl Sync for RealTimeService
impl Unpin for RealTimeService
impl UnwindSafe for RealTimeService
Blanket Implementations§
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
Mutably borrows from an owned value. Read more