Skip to content

Instantly share code, notes, and snippets.

@gildor
gildor / coroutine-delay.kt
Last active Jul 23, 2020
Proof of concept for Kotlin JS coroutines delay()
View coroutine-delay.kt
import kotlin.coroutines.experimental.*
import kotlin.js.Date
fun main(args: Array<String>) {
println("before launch")
launch {
println("hello: ${Date()}")
delay(3000)
println("bye: ${Date()}")
}