Package kotlin.system

Platform and version requirements: JVM

System-related utility functions.

Functions

exitProcess

fun exitProcess(status: Int): Nothing

Terminates the currently running Java Virtual Machine. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.

measureNanoTime

fun measureNanoTime(block: () -> Unit): Long

Executes the given block and returns elapsed time in nanoseconds.

measureTimeMillis

fun measureTimeMillis(block: () -> Unit): Long

Executes the given block and returns elapsed time in milliseconds.