Package-level declarations

Types

Link copied to clipboard

Simple immutable stopwatch to measure elapsed time in milliseconds.

Functions

Link copied to clipboard

Cleans this directory by deleting all files and directories inside it. Does nothing if the directory is empty or if the file does not exist or is not a directory.

Link copied to clipboard
fun <T> runWithTimeout(timeoutSeconds: Int?, onTimeout: (ExecutionTimeoutException) -> T? = null, action: () -> T): T

Runs action with an optional timeout. If timeoutSeconds is null or non-positive, action is executed directly on the current thread. Otherwise, it is submitted and bounded by the given duration.