Skip to main content

Clock

Trait Clock 

Source
pub trait Clock:
    Send
    + Sync
    + 'static {
    // Required method
    fn now(&self) -> Instant;
}
Expand description

The clock change stamps and highlight ages are measured with. The store and every view over it read the same clock.

Required Methods§

Source

fn now(&self) -> Instant

The current instant.

Implementations on Foreign Types§

Source§

impl Clock for BackgroundExecutor

GPUI’s executor clock: real time in applications, a fake clock in tests, web_time on the web.

Source§

fn now(&self) -> Instant

Implementors§