Skip to main content

ChronoTimer

Trait ChronoTimer 

Source
pub trait ChronoTimer: WallClockTimer {
    // Required method
    fn schedule_at_datetime<Tz>(
        &mut self,
        deadline: DateTime<Tz>,
        state: Self::State,
    ) -> Result<(), ChronoTimerError<Self::Error>>
       where Tz: TimeZone,
             Tz::Offset: Send + Sync;
}
Available on crate feature chrono only.
Expand description

Convenience API for scheduling with chrono::DateTime.

Required Methods§

Source

fn schedule_at_datetime<Tz>( &mut self, deadline: DateTime<Tz>, state: Self::State, ) -> Result<(), ChronoTimerError<Self::Error>>
where Tz: TimeZone, Tz::Offset: Send + Sync,

Schedule the state to be triggered at the given chrono deadline.

Note that these get eagerly converted to system time and are not stable with respect to timezone changes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> ChronoTimer for T
where T: WallClockTimer,