Class SystemTicker
java.lang.Object
io.netty.util.concurrent.SystemTicker
- All Implemented Interfaces:
Ticker
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final SystemTickerprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe initial value used for delay and computations based upon a monotonic time source.longnanoTime()The time elapsed since initialization of this class in nanoseconds.voidsleep(long delay, java.util.concurrent.TimeUnit unit) Waits until the given amount of time goes by.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Ticker
sleepMillis
-
Field Details
-
INSTANCE
-
START_TIME
private static final long START_TIME
-
-
Constructor Details
-
SystemTicker
SystemTicker()
-
-
Method Details
-
initialNanoTime
public long initialNanoTime()Description copied from interface:TickerThe initial value used for delay and computations based upon a monotonic time source.- Specified by:
initialNanoTimein interfaceTicker- Returns:
- initial value used for delay and computations based upon a monotonic time source.
-
nanoTime
-
sleep
public void sleep(long delay, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException Description copied from interface:TickerWaits until the given amount of time goes by.
-