Executor

abstract class Executor(val executeEveryNanos: Long, func: () -> Unit)

Create a new Executor.

Since

0.14.0

Parameters

executeEveryNanos

how often (in nanoseconds) to execute the given function.

func

the function to execute after the given time.

See also

Inheritors

Constructors

Link copied to clipboard
constructor(executeEveryNanos: Long, func: () -> Unit)

Properties

Link copied to clipboard
Link copied to clipboard
open val finished: Boolean

Returns true if this Executor has finished, meaning it can be safely removed.

Functions

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

Update this Executor, and execute it if the given amount of time has passed.