W3cubDocs

/Kotlin

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.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.system/index.html