CoroutineSchedulerTicker

class CoroutineSchedulerTicker(scope: CoroutineScope, intervalMs: Long = DEFAULT_TICK_INTERVAL_MS) : SchedulerTicker

Default SchedulerTicker: drives BreakScheduler.tick() from a coroutine delay loop on the supplied scope, every intervalMs ms. Pure Kotlin/JVM (no Android dependency); on Android the scope is typically the SDK's main-dispatcher scope so ticks land on the main thread.

The portable core scheduler has no internal timer (so it steps deterministically under the conformance harness); this supplies the cadence the web reference gets from its internal setInterval.

Constructors

Link copied to clipboard
constructor(scope: CoroutineScope, intervalMs: Long = DEFAULT_TICK_INTERVAL_MS)

Functions

Link copied to clipboard
open override fun start(onTick: () -> Unit)

Begin ticking; onTick is invoked on each interval until stop.

Link copied to clipboard
open override fun stop()

Stop ticking. Safe to call when not started.