Expand description
Library for clock and clock abstractions.
This library provides traits representing an abstract clock.
NowOnce,NowMut,Now, these are specialized versions of theFn*traits. They represent the operation to retrieve the current time.SleepOnce,SleepMut,Sleep, these are specialized versions of theFn*traits. They represent the operation to create a timer resolved at a later time.
This crate also provides aliases and utility traits.
ErasedSleep:Sleepvariant returning an opaque boxed future.StdClock,Chrono04Clock: high-level traitsNowExt: helper methods
Macros§
Structs§
- System
StdClock - Standard library clock using the system time.
- System
Tokio1 Chrono04 Clock - Tokio clock with chrono types using the system time.
- System
Tokio1 StdClock - Tokio clock with std types using the system time.
- Virtual
Clock State - Virtual
StdClock - Monotic virtual clock using the standard
Instanttype. - Virtual
Timer - Virtual
Tokio1 Chrono04 Clock - Tokio clock with chrono types using virtual time.
- Virtual
Tokio1 StdClock - Tokio clock with std types using virtual time.
- Virtual
Tokio1 StdClock State - Virtual
Tokio1 StdTimer
Traits§
- Chrono04
Clock - Alias trait for
ChronoNow + Clock - Chrono04
Now - Trait for a source of the current time, as a
chrono::DateTime<Utc>. - Duration
- Erased
Chrono04 Clock - Alias trait for
ChronoNow + ErasedClock - Erased
Sleep - Erased
Sleep Mut - Erased
Sleep Once - Dyn-compatible version of
Sleep. - Erased
StdClock - Alias trait for
StdNow + ErasedClock - Monotonic
- Marker trait indicating that a clock is monotonic.
- Now
- NowExt
- NowMut
- NowOnce
- Trait for a source of the current time, as an abstract point in time.
- Sleep
- Sleep
Mut - Sleep
Once - Trait for types providing timers, enabling to “sleep”.
- StdClock
- Alias trait for
StdNow + Clock - StdNow
- Trait for a source of the current time, as a standard
Instant.
Type Aliases§
- System
Tokio1 Chrono04 Timer - Type alias for the timer type used by
SystemTokio1Chrono04Clockfor itsClockimplementation. - System
Tokio1 StdTimer - Type alias for the timer type used by
SystemTokio1StdClockfor itsClockimplementation.