fun main() {
println("main starts")
routine(1, 500)
routine(2, 300)
println("main ends")
}
private fun routine(number: Int, delay: Long) {
println("Routine $number starts to work")
Thread.sleep(delay)
println("Routine $number finished")
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter