Interface MockTicker
- All Superinterfaces:
Ticker
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdvances the currentTicker.nanoTime()by the given amount of time.default voidadvanceMillis(long amountMillis) Advances the currentTicker.nanoTime()by the given amount of time.default longThe initial value used for delay and computations based upon a monotonic time source.Methods inherited from interface Ticker
nanoTime, sleep, sleepMillis
-
Method Details
-
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
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.
-