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