pub struct Clock { /* private fields */ }Expand description
The global virtual clock plus per-node skew schedules.
Implementations§
Source§impl Clock
impl Clock
Sourcepub fn advance_to(&mut self, target: Micros) -> Result<(), ClockError>
pub fn advance_to(&mut self, target: Micros) -> Result<(), ClockError>
Moves the clock to target. Moving backwards is an error.
Sourcepub fn advance_by(&mut self, delta: Micros) -> Micros
pub fn advance_by(&mut self, delta: Micros) -> Micros
Moves the clock forward by delta, returning the new time.
Sourcepub fn set_skew(&mut self, node: NodeId, schedule: SkewSchedule)
pub fn set_skew(&mut self, node: NodeId, schedule: SkewSchedule)
Installs a skew schedule for a node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Clock
impl RefUnwindSafe for Clock
impl Send for Clock
impl Sync for Clock
impl Unpin for Clock
impl UnsafeUnpin for Clock
impl UnwindSafe for Clock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more