Package kotlin.system

System-related utility functions.

Functions

JVM
Native
1.0

exitProcess

Terminates the currently running process.

fun exitProcess ( status : Int ) : Nothing
Native
1.3

getTimeMicros

Gets current system time in microseconds since certain moment in the past, only delta between two subsequent calls makes sense.

fun getTimeMicros ( ) : Long
Native
1.3

getTimeMillis

Gets current system time in milliseconds since certain moment in the past, only delta between two subsequent calls makes sense.

fun getTimeMillis ( ) : Long
Native
1.3

getTimeNanos

Gets current system time in nanoseconds since certain moment in the past, only delta between two subsequent calls makes sense.

fun getTimeNanos ( ) : Long

measureNanoTime

Executes the given block and returns elapsed time in nanoseconds.

JVM
1.0
fun measureNanoTime ( block : ( ) -> Unit ) : Long
Native
1.3
fun measureNanoTime ( block : ( ) -> Unit ) : Long
Native
1.3

measureTimeMicros

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

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

measureTimeMillis

Executes the given block and returns elapsed time in milliseconds.

JVM
1.0
fun measureTimeMillis ( block : ( ) -> Unit ) : Long
Native
1.3
fun measureTimeMillis ( block : ( ) -> Unit ) : Long