RecurringTimer
class RecurringTimer(val duration: Duration, interval: Duration = 100.milliseconds, timeSource: TimeSource = TimeSource.Monotonic, delayFunction: DelayFunction = { delayDuration -> delay(delayDuration) }, coroutineScope: CoroutineScope = MainScope()) : ControllableTimer
Timer based on the system clock.
Parameters
interval
The Duration between timer ticks
timeSource
The TimeSource for measuring intervals
delayFunction
Method for delaying a given Duration
coroutineScope
a parent coroutine scope for the timer
Constructors
Link copied to clipboard
constructor(duration: Duration, interval: Duration = 100.milliseconds, timeSource: TimeSource = TimeSource.Monotonic, delayFunction: DelayFunction = { delayDuration -> delay(delayDuration) }, coroutineScope: CoroutineScope = MainScope())
Properties
Functions
Link copied to clipboard
Awaits for the Timer to reach the Timer.State.NotRunning.Finished state.
Link copied to clipboard
Duration that has elapsed while Timer.state was Timer.State.Running.