orNull

suspend fun <T> orNull(block: suspend () -> T): T?

Runs block bounded by the remaining time and returns null on expiry.

The block runs under withTimeoutOrNull, so an already expired deadline returns null without running the block at all.