Clock

Trait Clock 

Source
pub trait Clock {
    // Required methods
    fn ticks_elapsed(&self) -> u64;
    fn wait<'life0, 'async_trait>(
        &'life0 self,
        ticks: u64,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The Clock used for every throttle

Required Methods§

Source

fn ticks_elapsed(&self) -> u64

The number of ticks elapsed since last queried

Source

fn wait<'life0, 'async_trait>( &'life0 self, ticks: u64, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Wait for ticks amount of time

Implementors§