public interface Clock
The default system implementation can be accessed at SYSTEM. Alternative implementations may be used for testing.
| Modifier and Type | Field and Description |
|---|---|
static Clock |
SYSTEM
Provides the default System implementation of a Clock by using
System.
|
| 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.
|
static final ClockSYSTEM
System.currentTimeMillis() .
long currentTimeMillis()
System.currentTimeMillis() .