Class CurrentMillisClock (2.1.2)

public final class CurrentMillisClock implements ApiClock, Serializable

Implementation of the ApiClock interface, which uses System#currentTimeMillis() as time source.

Inheritance

java.lang.Object > CurrentMillisClock

Implements

ApiClock, Serializable

Methods

getDefaultClock()

public static ApiClock getDefaultClock()
Returns
TypeDescription
ApiClock

millisTime()

public long millisTime()

Returns the current value of this clock's high-resolution time source, in milliseconds.

Returns
TypeDescription
long

nanoTime()

public long nanoTime()

Returns the current value of this clock's high-resolution time source, in nanoseconds.

Returns
TypeDescription
long