Skip to main content

Runtime

Trait Runtime 

Source
pub trait Runtime {
    // Required methods
    fn clock_ref(&self) -> &Arc<Mutex<Clock>>;
    fn yield_now(&self) -> RuntimeFuture;
    fn sleep(&self, duration: Duration) -> RuntimeFuture;
    fn create_interval(&self, duration: Duration) -> Interval;
    fn now(&self) -> Instant;
    fn elapsed_since(&self, start: Instant) -> u64;
    fn next_u64(&self) -> u64;
}

Required Methods§

Source

fn clock_ref(&self) -> &Arc<Mutex<Clock>>

Source

fn yield_now(&self) -> RuntimeFuture

Source

fn sleep(&self, duration: Duration) -> RuntimeFuture

Source

fn create_interval(&self, duration: Duration) -> Interval

Source

fn now(&self) -> Instant

Source

fn elapsed_since(&self, start: Instant) -> u64

Source

fn next_u64(&self) -> u64

Implementors§