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