public class ZooMagicClock extends Object implements TimeProvider
TimeProvider for running demo code. Provides wall clock time, but allows for magic shifting, so that
we can advance time during demo and not wait for 5 minutes for stats printing.| Constructor and Description |
|---|
ZooMagicClock() |
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMillis()
Returns current wall-clock time, equivalent to
System.currentTimeMillis(). |
long |
nanoTime()
Returns time with nanosecond resolution, equivalent to
System.nanoTime(). |
void |
shiftClockBy(java.time.Duration duration) |
public long currentTimeMillis()
TimeProviderSystem.currentTimeMillis().currentTimeMillis in interface TimeProviderpublic long nanoTime()
TimeProviderSystem.nanoTime().nanoTime in interface TimeProviderpublic void shiftClockBy(java.time.Duration duration)
Copyright © 2002-2023 Atlassian. All Rights Reserved.