TimeoutTimer

class TimeoutTimer(timerCalculation: (tries: Int) -> Long, scope: CoroutineScope)

A Timer class that schedules a Job to be called in the future. Can be configured to use a custom retry pattern, such as exponential backoff.

Constructors

Link copied to clipboard
fun TimeoutTimer(timerCalculation: (tries: Int) -> Long, scope: CoroutineScope)

Functions

Link copied to clipboard
fun reset()

Resets the Timer, clearing the number of current tries and stops any scheduled timeouts.

Link copied to clipboard
fun scheduleTimeout(block: suspend CoroutineScope.() -> Unit)

Cancels any previous timeouts and scheduled a new one