FixedTimeExecutor

open class FixedTimeExecutor @JvmOverloads constructor(val executeEveryNanos: Long, val repeats: Int = 0, func: () -> Unit) : Clock.Executor

Create a new FixedTimeExecutor.

Since

0.18.1

Parameters

repeats

how many times to repeat before stopping. If it is 0 (default) then it will last forever (see finished)

Constructors

Link copied to clipboard
constructor(executeEveryNanos: Long, repeats: Int = 0, func: () -> Unit)

Properties

Link copied to clipboard
var cycles: Int

amount of times this has executed. Only incremented when repeats is not 0 (i.e. it does not last forever) to prevent numerical overflow and keep method short.

Link copied to clipboard
Link copied to clipboard
val repeats: Int = 0

Functions

Link copied to clipboard
open override fun tick(deltaTimeNanos: Long): Long

Update this Executor.