Heartbeat

constructor(startDelay: Duration = Duration.ZERO, period: Duration, coroutineContext: CoroutineContext, task: () -> Unit)

Parameters

startDelay

The initial delay before the first execution of task.

period

The period between two executions of task.

coroutineContext

The coroutine context in which Heartbeat is run.

task

The task to execute at regular intervals.