| 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.currentTimeMillis(). |
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 FixedClock setTime(long newTime)
newTime - New time in milliseconds.public long currentTimeMillis()
ClockSystem.currentTimeMillis().currentTimeMillis in interface ClockCopyright © 2011–2025 Google. All rights reserved.