Suite • opensavvy.prepared.suite • Time
Time
class Time
Time control helper. See time.
Constructors
Time
@ExperimentalCoroutinesApi@ExperimentalTimeconstructor(environment: TestEnvironment)
Properties
nowMillis
Accesses the current time inside the test, in milliseconds.
scheduler
Accessor for the underlying TestCoroutineScheduler, which controls the current time.
source
Access a time source which can be used to measure elapsed time, as controlled with time.
Functions
advanceBy
@ExperimentalCoroutinesApifun Time.advanceBy(delay: Duration)
Advances the current time by delay.
advanceByMillis
@ExperimentalCoroutinesApifun Time.advanceByMillis(delay: Long)
Advances the current time by delay.
advanceUntilIdle
Runs all enqueued tasks in the specified order, advancing the virtual time as needed until there are no more scheduled tasks.
runCurrent
Runs all enqueued tasks at this moment in the virtual time.