Skip to content

Suiteopensavvy.prepared.suiteTime

Time

class Time

Time control helper. See time.

Constructors

Time

Properties

clock

Creates a Clock that follows the virtual time in this test.

now

Access the current virtual time within this test, as an Instant.

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

Advances the current time by delay.

advanceByMillis

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.

delayUntil

Delays until the virtual time reaches instant, executing all enqueued tasks in order.

Delays until the virtual time reaches isoString, formatted as an ISO 8601 timestamp, executing all enqueued tasks in order.

runCurrent

Runs all enqueued tasks at this moment in the virtual time.

set

Advances the virtual time until it reaches instant.

Advances the virtual time until it reaches isoString, formatted as an ISO 8601 timestamp.