Trait omaha_client::time::Timer

source ·
pub trait Timer {
    // Required methods
    fn wait_until(
        &mut self,
        time: impl Into<PartialComplexTime>
    ) -> BoxFuture<'static, ()>;
    fn wait_for(&mut self, duration: Duration) -> BoxFuture<'static, ()>;
}
Expand description

Trait for timers that understand how to work with the ComplexTime and PartialComplexTime types.

When using a PartialComplexTime, the trait defines Fns for waiting until any of the times have been reached, or until all of them have been reached.

Required Methods§

source

fn wait_until( &mut self, time: impl Into<PartialComplexTime> ) -> BoxFuture<'static, ()>

Wait until at least one of the given time bounds has been reached.

source

fn wait_for(&mut self, duration: Duration) -> BoxFuture<'static, ()>

Wait for the given duration (from now).

Object Safety§

This trait is not object safe.

Implementors§