virtualClock

fun TestScope.virtualClock(startEpochMillis: Long = VirtualClock.DEFAULT_START_EPOCH_MILLIS): VirtualClock(source)

Builds a VirtualClock on this test's scheduler, so delay in the test body, on the clock's VirtualClock.dispatcher and in the code under test all move with VirtualClock.advanceBy.

Stable Core, source compatibility only.

Return

the clock, sharing testScheduler.

Parameters

startEpochMillis

the wall-clock reading at construction; VirtualClock.DEFAULT_START_EPOCH_MILLIS by default.