tick(long duration,
TimeUnit timeUnit)
Runs time forwards by a given duration, executing any commands scheduled for
execution during that time period, and any background tasks spawned by the
scheduled tasks.

DeterministicScheduler

tick

Runs time forwards by a given duration, executing any commands scheduled for
execution during that time period, and any background tasks spawned by the
scheduled tasks. Therefore, when a call to tick returns, the executor
will be idle.

Parameters:

duration -

timeUnit -

runUntilIdle

public void runUntilIdle()

Runs all commands scheduled to be executed immediately but does
not tick time forward.