Compatibility with KotlinX.Datetime • opensavvy.prepared.compat.kotlinx.datetime
Package-level declarations
Properties
clock
@ExperimentalCoroutinesApival Time.clock: Clock
Creates a Clock that follows the virtual time in this test.
now
@ExperimentalCoroutinesApival Time.now: Instant
Accesses the current virtual time within this test, as an Instant.
Functions
delayUntil
@ExperimentalCoroutinesApisuspend fun Time.delayUntil(isoString: String)
Delays until the virtual time reaches isoString, formatted as an ISO 8601 timestamp, executing all enqueued tasks in order.
@ExperimentalCoroutinesApisuspend fun Time.delayUntil(instant: Instant)
Delays until the virtual time reaches instant, executing all enqueued tasks in order.
set
@ExperimentalCoroutinesApisuspend fun Time.set(isoString: String)
Advances the virtual time until it reaches isoString, formatted as an ISO 8601 timestamp.
@ExperimentalCoroutinesApisuspend fun Time.set(instant: Instant)
Advances the virtual time until it reaches instant.