interval

inline fun interval(intervalSeconds: Float, delaySeconds: Float = 0.0f, repeatCount: Int = -2, crossinline task: () -> Unit): Timer.Task

Simplifies Timer API.

Return

callback to the task.

Parameters

intervalSeconds

time between each execution.

delaySeconds

the execution will begin after this delay. Defaults to 0.

repeatCount

additional task executions amount. For example, repeat count of 2 causes the task to be executed 3 times. Optional. If not set, task will be repeated indefinitely.

task

will be repeatedly executed on the rendering thread.