after

abstract fun after(delayMs: Long, task: Runnable): Subscription(source)

Runs task once, no sooner than delayMs from now (0 runs as soon as the worker is free). Cancelling the returned subscription before it runs stops it.

Return

a handle that withdraws the task, if it has not started

Parameters

delayMs

milliseconds to wait; a negative value counts as 0

task

the work, run on the plugin's worker thread