Class NanoClock (2.1.2)

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

Methods

getDefaultClock()

public static ApiClock getDefaultClock()
Returns
TypeDescription
ApiClock

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