Constructor and Description |
---|
SystemClock() |
Modifier and Type | Method and Description |
---|---|
boolean |
isNowBefore(long endInMillis)
Tests if a point in time occurs before the
current time . |
long |
laterBy(long durationInMillis)
Computes a point of time in the future.
|
long |
now() |
public long laterBy(long durationInMillis)
Clock
laterBy
in interface Clock
durationInMillis
- The point in the future, in milliseconds relative to the current time
.public boolean isNowBefore(long endInMillis)
Clock
current time
.isNowBefore
in interface Clock
endInMillis
- The timestamnp to check.public long now()
now
in interface Clock
System.currentTimeMillis()
Copyright © 2015. All rights reserved.