arrow-fx-coroutines / arrow.fx.coroutines / sleep

sleep

suspend fun ~~sleep~~(duration: Duration): Unit Deprecated: Use delay

Sleeps for a given duration without blocking a thread.

import arrow.fx.coroutines.*

suspend fun main(): Unit {
  sleep(5.seconds)
  println("Message after sleeping")
}

Do you like Arrow?

Arrow Org
<