Suite • opensavvy.prepared.suite • now
now¶
Access the current virtual time within this test, as an Instant.
Example¶
test("Using the virtual time") {
val initial = time.now
// …do something…
delay(5000)
check(time.now == initial + 5000)
}
For the specific use-case of measuring elapsed time, see Time.source.
See also¶
- clockTo pass the time to another system.