measureTimeMicros

inline fun measureTimeMicros(block: () -> Unit): Long(source)

Deprecated

Warning since 1.9

Error since 2.1

Use measureTime() instead.

Replace with

import kotlin.time.measureTime
measureTime(block).inWholeMicroseconds

Executes the given block and returns elapsed time in microseconds (Kotlin/Native only).

This function is deprecated. To measure the duration of execution of a block of code, use measureTime or measureTimedValue instead. The resulting Duration then can be expressed as a Long number of microseconds using Duration.inWholeMicroseconds.

Since Kotlin

1.3