public final class TestScheduler extends Scheduler
Scheduler.Worker| Constructor and Description |
|---|
TestScheduler() |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceTimeBy(long delayTime,
java.util.concurrent.TimeUnit unit)
Moves the Scheduler's clock forward by a specified amount of time.
|
void |
advanceTimeTo(long delayTime,
java.util.concurrent.TimeUnit unit)
Moves the Scheduler's clock to a particular moment in time.
|
Scheduler.Worker |
createWorker() |
long |
now(java.util.concurrent.TimeUnit unit)
Returns the 'current time' of the Scheduler in the specified time unit.
|
void |
triggerActions()
Triggers any actions that have not yet been triggered and that are scheduled to be triggered at or
before this Scheduler's present time.
|
scheduleDirect, scheduleDirect, schedulePeriodicallyDirect, shutdown, startpublic long now(java.util.concurrent.TimeUnit unit)
Schedulerpublic void advanceTimeBy(long delayTime,
java.util.concurrent.TimeUnit unit)
delayTime - the amount of time to move the Scheduler's clock forwardunit - the units of time that delayTime is expressed inpublic void advanceTimeTo(long delayTime,
java.util.concurrent.TimeUnit unit)
delayTime - the point in time to move the Scheduler's clock tounit - the units of time that delayTime is expressed inpublic void triggerActions()
public Scheduler.Worker createWorker()
createWorker in class Scheduler