Skip to content

Instantly share code, notes, and snippets.

@gildor
gildor / coroutine-delay.kt
Last active July 23, 2020 02:38
Proof of concept for Kotlin JS coroutines delay()
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()}")
}