Timer

interface Timer

A timer ticking a certain duration.

Inheritors

Types

Link copied to clipboard
interface State

The state of a Timer

Properties

Link copied to clipboard

The current State of the timer.

Link copied to clipboard
abstract val duration: Duration

Timer Duration.

Link copied to clipboard
abstract val state: Flow<Timer.State>

Flow of State of the timer.

Functions

Link copied to clipboard
suspend fun Timer.awaitFinish()

Awaits for the Timer to reach the Timer.State.NotRunning.Finished state.

Link copied to clipboard
fun Timer.elapsed(): Flow<Duration>

Duration that has elapsed while Timer.state was Timer.State.Running.