kotlin.system docs improvements

- Rewrite exitProcess docs in a more common way
- Add [block] parameter reference
This commit is contained in:
Ilya Gorbunov
2018-10-19 00:47:32 +03:00
parent 3aff7112e0
commit 1ed136a621
2 changed files with 7 additions and 6 deletions
@@ -7,11 +7,12 @@
package kotlin.system
/**
* Terminates the currently running Java Virtual Machine. The
* argument serves as a status code; by convention, a nonzero status
* code indicates abnormal termination.
* Terminates the currently running process.
*
* This method never returns normally.
* @param status serves as a status code; by convention,
* a nonzero status code indicates abnormal termination.
*
* @return This method never returns normally.
*/
@kotlin.internal.InlineOnly
public inline fun exitProcess(status: Int): Nothing {
@@ -7,7 +7,7 @@
package kotlin.system
/**
* Executes the given block and returns elapsed time in milliseconds.
* Executes the given [block] and returns elapsed time in milliseconds.
*/
public inline fun measureTimeMillis(block: () -> Unit): Long {
val start = System.currentTimeMillis()
@@ -16,7 +16,7 @@ public inline fun measureTimeMillis(block: () -> Unit): Long {
}
/**
* Executes the given block and returns elapsed time in nanoseconds.
* Executes the given [block] and returns elapsed time in nanoseconds.
*/
public inline fun measureNanoTime(block: () -> Unit): Long {
val start = System.nanoTime()