Package-level declarations

System-related utility functions.

System-related utility functions.

Functions

Link copied to clipboard
inline fun exitProcess(status: Int): Nothing

Terminates the currently running process.

Since Kotlin 1.0
external fun exitProcess(status: Int): Nothing

Terminates the currently running process.

Since Kotlin 1.3
Link copied to clipboard
external fun getTimeMicros(): Long

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

Since Kotlin 1.3
Link copied to clipboard
external fun getTimeMillis(): Long

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

Since Kotlin 1.3
Link copied to clipboard
external fun getTimeNanos(): Long

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

Since Kotlin 1.3
Link copied to clipboard
inline fun measureNanoTime(block: () -> Unit): Long

Executes the given block and returns elapsed time in nanoseconds.

Since Kotlin 1.0
inline fun measureNanoTime(block: () -> Unit): Long

Executes the given block and returns elapsed time in nanoseconds.

Since Kotlin 1.3
Link copied to clipboard
inline fun measureTimeMicros(block: () -> Unit): Long

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

Since Kotlin 1.3
Link copied to clipboard
inline fun measureTimeMillis(block: () -> Unit): Long

Executes the given block and returns elapsed time in milliseconds.

Since Kotlin 1.0
inline fun measureTimeMillis(block: () -> Unit): Long

Executes the given block and returns elapsed time in milliseconds.

Since Kotlin 1.3