delay

open suspend fun delay(
    time: Long,
    unit: TimeUnit = TimeUnit.MILLISECONDS
): Unit
(source)

Platform and version requirements: JVM

Delays coroutine for a given time without blocking a thread and resumes it after a specified time. This suspending function is cancellable. If the Job of the current coroutine is cancelled or completed while this suspending function is waiting, this function immediately resumes with CancellationException.