Crate diem_time_service[][src]

Expand description

Abstract time service

Re-exports

pub use crate::mock::MockSleep;
pub use crate::mock::MockTimeService;
pub use crate::real::RealTimeService;
pub use crate::interval::Interval;
pub use crate::real::RealSleep;
pub use crate::timeout::Timeout;

Modules

Enums

A Future that resolves after some time has elapsed (either real or simulated, depending on the parent TimeService).

TimeService abstracts all time-related operations in one place that can be easily mocked-out and controlled in tests or delegated to the actual underlying runtime (usually tokio). It’s provided as an enum so we don’t have to infect everything with a generic tag.

Traits