Package com.google.api.core
Class NanoClock
- java.lang.Object
-
- com.google.api.core.NanoClock
-
- All Implemented Interfaces:
ApiClock,Serializable
public final class NanoClock extends Object implements ApiClock, Serializable
Default implementation of the ApiClock interface, using call to System.nanoTime().- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApiClockgetDefaultClock()longmillisTime()Returns the current value of this clock's high-resolution time source, in milliseconds.longnanoTime()Returns the current value of this clock's high-resolution time source, in nanoseconds.
-
-
-
Method Detail
-
getDefaultClock
public static ApiClock getDefaultClock()
-
nanoTime
public final long nanoTime()
Description copied from interface:ApiClockReturns the current value of this clock's high-resolution time source, in nanoseconds.
-
millisTime
public final long millisTime()
Description copied from interface:ApiClockReturns the current value of this clock's high-resolution time source, in milliseconds.- Specified by:
millisTimein interfaceApiClock
-
-