Package velox.api.layer1.common
Class NanoClock
java.lang.Object
velox.api.layer1.common.NanoClock
public class NanoClock
extends java.lang.Object
Provides high precision timestamps. It's around
System.currentTimeMillis()
* 1000_000, but it increases smoothly
between neighboring milliseconds.-
Constructor Summary
Constructors Constructor Description NanoClock()
-
Method Summary
Modifier and Type Method Description static long
currentTimeNanos()
Get current time in nanoseconds.
-
Constructor Details
-
NanoClock
public NanoClock()
-
-
Method Details
-
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)
-