invokeOnTimeout

open fun invokeOnTimeout(
    time: Long,
    unit: TimeUnit,
    block: Runnable
): DisposableHandle
(source)

Platform and version requirements: JVM

Schedules invocation of a specified block after a specified delay time. The resulting DisposableHandle can be used to dispose of this invocation request if it is not needed anymore.

This implementation uses a built-in single-threaded scheduled executor service.

abstract fun invokeOnTimeout(
    time: Int,
    block: Runnable
): DisposableHandle
(source)

Platform and version requirements: JS

Schedules invocation of a specified block after a specified delay time. The resulting DisposableHandle can be used to dispose of this invocation request if it is not needed anymore.