setClock
setClock
sets the clock used to compute the current time. This allows a custom clock to be used instead of the current system clock. This is mainly used for replay simulations.
Syntax
setClock(clock)
Parameters
Parameter | Type | Description |
---|---|---|
clock | Clock | The clock to use. |
Returns
Sets the clock.
Examples
The following example sets the clock to the current clock used by the system.
setClock(currentClock())