timerAsync

fun timerAsync(delay: Ticks, period: Ticks, task: () -> Unit): TaskHandle

Runs the task repeatedly and asynchronously with the specified delay and period.

Return

a TaskHandle that can be used to cancel the task

Parameters

delay

the amount of time to wait before the first execution

period

the interval between subsequent executions

task

the block of code to execute