This is a scheduler for coroutines used in tests, providing the delay-skipping behavior.
Test dispatchers are parameterized with a scheduler. Several dispatchers can share the same scheduler, in which case their knowledge about the virtual time will be synchronized. When the dispatchers require scheduling an event at a later point in time, they notify the scheduler, which will establish the order of the tasks.
The scheduler can be queried to advance the time (via advanceTimeBy), run all the scheduled tasks advancing the virtual time as needed (via advanceUntilIdle), or run the tasks that are scheduled to run as soon as possible but haven't yet been dispatched (via runCurrent).