Class NanoClock (2.33.0)

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
Type Description
ApiClock

Methods

millisTime()

public final long millisTime()

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

Returns
Type Description
long

nanoTime()

public final long nanoTime()

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

Returns
Type Description
long