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.voidWaits until the given amount of time goes by.Methods inherited from class 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
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
Description copied from interface:TickerWaits until the given amount of time goes by.- Specified by:
sleepin interfaceTicker- Parameters:
delay- the amount of delay.unit- theTimeUnitofdelay.- Throws:
InterruptedException- See Also:
-