Package io.netty.util.concurrent
Class SystemTicker
- java.lang.Object
-
- io.netty.util.concurrent.SystemTicker
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static SystemTickerINSTANCEprivate static longSTART_TIME
-
Constructor Summary
Constructors Constructor Description SystemTicker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longinitialNanoTime()The 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, wait
-
Methods inherited from interface io.netty.util.concurrent.Ticker
sleepMillis
-
-
-
-
Field Detail
-
INSTANCE
static final SystemTicker INSTANCE
-
START_TIME
private static final long START_TIME
-
-
Method Detail
-
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
public long nanoTime()
Description copied from interface:TickerThe time elapsed since initialization of this class in nanoseconds. This may return a negative number just likeSystem.nanoTime().
-
sleep
public void sleep(long delay, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionDescription copied from interface:TickerWaits until the given amount of time goes by.
-
-