mersan
11/05/2018, 10:55 AMrunBlocking {
val timer = measureTimeMillis { delay(1000) }
println("Delay Measure: $timer")
val timer2 = measureTimeMillis { Thread.sleep(1000) }
println("Thread Sleep Measure: $timer2")
}
but the result was unexpected for me:
Delay Measure: 1064
Thread Sleep Measure: 1002
Is it something I should expect the delay
in coroutine takes more time than the Thread.sleep
?gildor
11/05/2018, 12:10 PMmersan
11/05/2018, 1:45 PM