Package com.google.api.core
Class CurrentMillisClock
- java.lang.Object
-
- com.google.api.core.CurrentMillisClock
-
- All Implemented Interfaces:
ApiClock
,Serializable
public final class CurrentMillisClock extends Object implements ApiClock, Serializable
Implementation of theApiClock
interface, which usesSystem.currentTimeMillis()
as time source.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApiClock
getDefaultClock()
long
millisTime()
Returns the current value of this clock's high-resolution time source, in milliseconds.long
nanoTime()
Returns the current value of this clock's high-resolution time source, in nanoseconds.
-
-
-
Method Detail
-
getDefaultClock
public static ApiClock getDefaultClock()
-
nanoTime
public long nanoTime()
Description copied from interface:ApiClock
Returns the current value of this clock's high-resolution time source, in nanoseconds.
-
millisTime
public long millisTime()
Description copied from interface:ApiClock
Returns the current value of this clock's high-resolution time source, in milliseconds.- Specified by:
millisTime
in interfaceApiClock
-
-