Ticker

class Ticker(dispatcher: CoroutineDispatcher = Dispatchers.Default) : CoroutineScope(source)

A reusable fixed rate ticker.

Parameters

dispatcher

The dispatchers the events will be fired on.

Constructors

Link copied to clipboard
constructor(dispatcher: CoroutineDispatcher = Dispatchers.Default)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
suspend fun stop()
Link copied to clipboard
suspend fun tickAt(intervalMillis: Long, block: suspend () -> Unit)