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 package kotlin.system
/** /**
* Terminates the currently running Java Virtual Machine. The * Terminates the currently running process.
* argument serves as a status code; by convention, a nonzero status
* code indicates abnormal termination.
* *
* 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 @kotlin.internal.InlineOnly
public inline fun exitProcess(status: Int): Nothing { public inline fun exitProcess(status: Int): Nothing {
@@ -7,7 +7,7 @@
package kotlin.system 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 { public inline fun measureTimeMillis(block: () -> Unit): Long {
val start = System.currentTimeMillis() 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 { public inline fun measureNanoTime(block: () -> Unit): Long {
val start = System.nanoTime() val start = System.nanoTime()