pub struct ClockRef { /* private fields */ }
Expand description

This struct exposes only immutable access to the simulation clock. The clock itself is owned by the scheduler, while others can obtain ClockRef to read the current simulation time.

Example

let scheduler = Scheduler::default();
let clock_ref = scheduler.clock();
assert_eq!(clock_ref.time(), scheduler.time());

Implementations

Return the current simulation time.

Trait Implementations

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.