📜  koltin measureTimeMillis - Kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:33.200000             🧑  作者: Mango

代码示例1
val numbers: List
    val timeInMillis = measureTimeMillis {
        numbers = buildList {
            addAll(0..100)
            shuffle()
            sortDescending()
        }
    }
// here numbers are initialized and sorted
println(numbers.first()) // 100

println("(The operation took $timeInMillis ms)")