timer

abstract suspend fun timer(duration: Duration): Awaitable<Unit>

Causes the start of a timer for the given duration. You can await on the timer end by invoking Awaitable.await.

Parameters

duration

for which to sleep.