Package io.netty.util.concurrent
Interface MockTicker
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
advance(long amount, java.util.concurrent.TimeUnit unit)
Advances the currentTicker.nanoTime()
by the given amount of time.default void
advanceMillis(long amountMillis)
Advances the currentTicker.nanoTime()
by the given amount of time.default long
initialNanoTime()
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:Ticker
The initial value used for delay and computations based upon a monotonic time source.- Specified by:
initialNanoTime
in 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
- theTimeUnit
ofamount
.
-
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.
-
-