Class CurrentMillisClock (2.6.0)

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

Static Methods

getDefaultClock()

public static ApiClock getDefaultClock()
Returns
TypeDescription
ApiClock

Methods

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