Package org.agrona.concurrent
Class SystemNanoClock
java.lang.Object
org.agrona.concurrent.SystemNanoClock
- All Implemented Interfaces:
NanoClock
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SystemNanoClock
As there is no instance state then this object can be used to save on allocation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
nanoTime()
The number of ticks in nanoseconds the clock has advanced since starting.
-
Field Details
-
INSTANCE
As there is no instance state then this object can be used to save on allocation.
-
-
Constructor Details
-
SystemNanoClock
public SystemNanoClock()
-
-
Method Details
-
nanoTime
public long nanoTime()The number of ticks in nanoseconds the clock has advanced since starting.This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time. The value returned represents nanoseconds since some fixed but arbitrary origin time (perhaps in the future, so values may be negative). The same origin is used by all invocations of this method in an instance of a Java virtual machine; other virtual machine instances are likely to use a different origin.
-