Package kotlin.system
System-related utility functions.
Functions
exitProcess
Terminates the currently running process.
fun exitProcess(status: Int): NothinggetTimeMicros
Gets current system time in microseconds since certain moment in the past, only delta between two subsequent calls makes sense.
fun getTimeMicros(): LonggetTimeMillis
Gets current system time in milliseconds since certain moment in the past, only delta between two subsequent calls makes sense.
fun getTimeMillis(): LonggetTimeNanos
Gets current system time in nanoseconds since certain moment in the past, only delta between two subsequent calls makes sense.
fun getTimeNanos(): LongmeasureNanoTime
Executes the given block and returns elapsed time in nanoseconds.
fun measureNanoTime(block: () -> Unit): LongmeasureTimeMicros
Executes the given block and returns elapsed time in microseconds (Kotlin/Native only).
fun measureTimeMicros(block: () -> Unit): LongmeasureTimeMillis
Executes the given block and returns elapsed time in milliseconds.
fun measureTimeMillis(block: () -> Unit): Long