| Constructor and Description |
|---|
ManualClock() |
ManualClock(long time) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(long timeToAdd) |
long |
getTimeMillis() |
void |
setTime(long timeToSet) |
long |
waitTillTime(long targetTime) |
public long getTimeMillis()
getTimeMillis in interface Clockpublic void setTime(long timeToSet)
timeToSet - new time (in milliseconds) that the clock should representpublic void advance(long timeToAdd)
timeToAdd - time (in milliseconds) to add to the clock's timepublic long waitTillTime(long targetTime)
waitTillTime in interface ClocktargetTime - block until the clock time is set or advanced to at least this time