pub trait TimeProvider {
    fn now<Tz>(tz: &Tz) -> DateTime<Tz>
    where
        Tz: TimeZone + Sync + Send
; }
Expand description

A trait for providing custom time providers. TimeProviders are used to specify where the source of DateTimes used by the scheduler. For most purposes, the default ChronoTimeProvider is sufficient; the main use case for custom TimeProviders is for writing tests.

Required Methods

Returns the current time, according to the TimeProvider

Implementors