Skip to main content

NanoClock

Package: velox.api.layer1.common

Type: Class

Inheritance: java.lang.Object รขโ€ โ€™ velox.api.layer1.common.NanoClock

Descriptionโ€‹

Provides high precision timestamps. It's around System.currentTimeMillis() * 1000_000, but it increases smoothly between neighboring milliseconds.

Constructorsโ€‹

NanoClockโ€‹

public NanoClock()

Methodsโ€‹

currentTimeNanosโ€‹

public static long currentTimeNanos()

Get current time in nanoseconds. Expected to be fast, less than ~50 nanoseconds per call if called sequentially (~33ns/call on Ryzen 7 2700X)

Returns: Current time in nanoseconds


Methods inherited from class java.lang.Object: clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait