public interface ClockClock which can be used to get the amount of elapsed milliseconds in system time.
The default system implementation can be accessed at #SYSTEM. Alternative implementations may be used for testing.
Static Fields
SYSTEM
public static final Clock SYSTEMProvides the default System implementation of a Clock by using System#currentTimeMillis().
| Field Value | |
|---|---|
| Type | Description |
Clock |
|
Methods
currentTimeMillis()
public abstract long currentTimeMillis()Returns the current time in milliseconds since midnight, January 1, 1970 UTC, to match the behavior of System#currentTimeMillis().
| Returns | |
|---|---|
| Type | Description |
long |
|