blob: 36acd77a6dd24d6d3c0f6da213171061f9447ca8 [file] [log] [blame]
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.compose.example01
import kotlinx.coroutines.experimental.*
import kotlin.system.measureTimeMillis
suspend fun doSomethingUsefulOne(): Int {
delay(1000L) // pretend we are doing something useful here
return 13
}
suspend fun doSomethingUsefulTwo(): Int {
delay(1000L) // pretend we are doing something useful here, too
return 29
}
fun main(args: Array<String>) = runBlocking<Unit> {
val time = measureTimeMillis {
val one = doSomethingUsefulOne()
val two = doSomethingUsefulTwo()
println("The answer is ${one + two}")
}
println("Completed in $time ms")
}