now

abstract suspend fun now(): Instant

Returns the current time as a deterministic Instant.

This method returns the current timestamp in a way that is consistent across replays. The time is captured using [runBlock], ensuring that the same value is returned during replay as was returned during the original execution.

Return

the recorded Instant

See also

Throws

if called outside a Restate handler