Package io.netty.util.concurrent
Interface MockTicker
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidadvance(long amount, java.util.concurrent.TimeUnit unit)Advances the currentTicker.nanoTime()by the given amount of time.default voidadvanceMillis(long amountMillis)Advances the currentTicker.nanoTime()by the given amount of time.default longinitialNanoTime()The initial value used for delay and computations based upon a monotonic time source.-
Methods inherited from interface io.netty.util.concurrent.Ticker
nanoTime, sleep, sleepMillis
-
-
-
-
Method Detail
-
initialNanoTime
default 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.
-
advance
void advance(long amount, java.util.concurrent.TimeUnit unit)Advances the currentTicker.nanoTime()by the given amount of time.- Parameters:
amount- the amount of time to advance this ticker by.unit- theTimeUnitofamount.
-
advanceMillis
default void advanceMillis(long amountMillis)
Advances the currentTicker.nanoTime()by the given amount of time.- Parameters:
amountMillis- the number of milliseconds to advance this ticker by.
-
-