Skip to main content

Clock

Trait Clock 

Source
pub trait Clock {
    // Required methods
    fn now_ms(&self) -> u64;
    fn schedule(&self, after_ms: u64, f: Box<dyn FnOnce()>);
}
Expand description

The clock the cache keeps time by, and its timers (UI-10: a live’s debounce_ms).

Required Methods§

Source

fn now_ms(&self) -> u64

Source

fn schedule(&self, after_ms: u64, f: Box<dyn FnOnce()>)

Runs f once, after_ms from now.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§