remainingMsFlow

fun SleepTimer.remainingMsFlow(intervalMs: Long = 50): Flow<Long>

Emits SleepTimer.remainingMs on a regular interval.

Completes when the timer reaches SleepTimerState.COMPLETED, after a final 0 emission if the last polled value was not already zero. Cancel the collector to stop earlier.

Parameters

intervalMs

Emission interval in milliseconds. Default is 50 ms.

See also