Class CurrentMillisClock (2.30.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
Type Description
ApiClock

Methods

millisTime()

public long millisTime()

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

Returns
Type Description
long

nanoTime()

public long nanoTime()

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

Returns
Type Description
long