Class NanoClock (2.29.1)

public final class NanoClock implements ApiClock, Serializable

Default implementation of the ApiClock interface, using call to System.nanoTime().

Inheritance

java.lang.Object > NanoClock

Implements

ApiClock, Serializable

Static Methods

getDefaultClock()

public static ApiClock getDefaultClock()
Returns
TypeDescription
ApiClock

Methods

millisTime()

public final long millisTime()

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

Returns
TypeDescription
long

nanoTime()

public final long nanoTime()

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

Returns
TypeDescription
long