| Constructor and Description |
|---|
FixedClock()
Initializes the FixedClock with 0 millis as start time.
|
FixedClock(long startTime)
Initializes the FixedClock with the specified time.
|
| Modifier and Type | Method and Description |
|---|---|
long |
currentTimeMillis()
Returns the current time in milliseconds since midnight, January 1, 1970 UTC, to match the behavior of
System.
|
FixedClock |
setTime(long newTime)
Changes the time value this time provider is returning.
|
public FixedClock()
public FixedClock(long startTime)
startTime - time in milliseconds used for initialization.
public FixedClocksetTime(long newTime)
newTime - New time in milliseconds.
public long currentTimeMillis()
Clock
System.currentTimeMillis() .