Package com.google.api.client.util
Interface Clock
-
- All Known Implementing Classes:
FixedClock
public interface Clock
Clock 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.- Since:
- 1.9
- Author:
- mlinder@google.com (Matthias Linder)
-
-
Field Summary
Fields Modifier and Type Field Description static Clock
SYSTEM
Provides the default System implementation of a Clock by usingSystem.currentTimeMillis()
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
currentTimeMillis()
Returns the current time in milliseconds since midnight, January 1, 1970 UTC, to match the behavior ofSystem.currentTimeMillis()
.
-
-
-
Field Detail
-
SYSTEM
static final Clock SYSTEM
Provides the default System implementation of a Clock by usingSystem.currentTimeMillis()
.
-
-
Method Detail
-
currentTimeMillis
long currentTimeMillis()
Returns the current time in milliseconds since midnight, January 1, 1970 UTC, to match the behavior ofSystem.currentTimeMillis()
.
-
-