KInterval

constructor(scope: CoroutineScope, period: Duration?, block: suspend () -> Unit)(source)

Parameters

scope

CoroutineScope that owns the interval job.

period

Time between invocations. Pass null to start paused.

block

Suspending action called on each tick.