Trait Clock

Source
pub trait Clock: Send {
    // Required method
    fn synchronize(&mut self, deadline: MonotonicTime) -> SyncStatus;
}
Expand description

A type that can be used to synchronize a simulation.

This trait abstract over the different types of clocks, such as as-fast-as-possible and real-time clocks.

A clock can be associated to a simulation at initialization time by calling SimInit::init_with_clock().

Required Methods§

Source

fn synchronize(&mut self, deadline: MonotonicTime) -> SyncStatus

Blocks until the deadline.

Implementors§