public class DefaultTicker extends Object implements Ticker
System.nanoTime().
The stableMilliseconds() method provides correct values at least for 192 years since creation.| Modifier and Type | Method and Description |
|---|---|
static Ticker |
getInstance() |
long |
nanoTime()
Returns the current value of the running Java Virtual Machine's high-resolution time source, in nanoseconds.
|
long |
stableMilliseconds()
Returns the current value of the running Java Virtual Machine's high-resolution time source, in milliseconds with following characteristics:
Value is not sensitive to any change of system time.
Value is always positive.
Value is not correlated to
Date.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdefaultTicker, mockpublic static Ticker getInstance()
DefaultTickerpublic long nanoTime()
Tickerpublic long stableMilliseconds()
TickerDate.stableMilliseconds in interface TickerCopyright © 2020. All rights reserved.