Skip to main content

VortexClock

Trait VortexClock 

Source
pub trait VortexClock {
    // Required methods
    fn now_us(&self) -> u64;
    fn sleep_us(&self, duration_us: u64);
}
Expand description

Clock boundary trait.

In production: SystemTime::now(). In simulation: SimClock with virtual time, skew, and drift injection.

Required Methods§

Source

fn now_us(&self) -> u64

Get the current time in microseconds.

Source

fn sleep_us(&self, duration_us: u64)

Sleep for the given duration (in microseconds). In simulation, this schedules a timer event.

Implementors§