java.lang.Object
stormpot.internal.NanoClock
Convenience functions for operating on relative nanosecond time spans.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longelapsed(long startNanos) Compute the number of nanoseconds passed since the given start time.static longnanoTime()Equivalent ofSystem.nanoTime().
-
Method Details
-
nanoTime
public static long nanoTime()Equivalent ofSystem.nanoTime().- Returns:
- The current timestamp in nanoseconds.
- See Also:
-
elapsed
public static long elapsed(long startNanos) Compute the number of nanoseconds passed since the given start time.- Parameters:
startNanos- The starting timestamp, obtained fromnanoTime().- Returns:
- The elapsed time since the start time, in nanoseconds.
-