time

suspend fun time(runnable: Runnable): Double

Starts a timer for measuring the duration of an operation and returns the elapsed time in seconds.

Return

A double representing the elapsed time in seconds.

Parameters

runnable

The operation to time.