Package io.deephaven.enterprise.replay
Class DeltaClockWithAdjustableSpeed
java.lang.Object
io.deephaven.enterprise.replay.DeltaClockWithAdjustableSpeed
- All Implemented Interfaces:
Clock
A clock impl with a delta adjustment and a speed factor.
The speed can be changed on the fly, which is a nifty trick for demos.
-
Constructor Summary
ConstructorsConstructorDescriptionDeltaClockWithAdjustableSpeed
(@NotNull Clock delegate, long deltaNanos, double speedFactor) Constructs a delta clock with the provided clock and delta. -
Method Summary
-
Constructor Details
-
DeltaClockWithAdjustableSpeed
public DeltaClockWithAdjustableSpeed(@NotNull @NotNull Clock delegate, long deltaNanos, double speedFactor) Constructs a delta clock with the provided clock and delta.- Parameters:
delegate
- the base clockdeltaNanos
- the delta nanos
-
-
Method Details
-
setSpeedFactor
public void setSpeedFactor(double newFactor) -
getSpeedFactor
public double getSpeedFactor() -
currentTimeMillis
public long currentTimeMillis()- Specified by:
currentTimeMillis
in interfaceClock
-
currentTimeMicros
public long currentTimeMicros()- Specified by:
currentTimeMicros
in interfaceClock
-
currentTimeNanos
public long currentTimeNanos()- Specified by:
currentTimeNanos
in interfaceClock
-
instantNanos
- Specified by:
instantNanos
in interfaceClock
-
instantMillis
- Specified by:
instantMillis
in interfaceClock
-