Class TimeoutManagerKt
-
- All Implemented Interfaces:
public final class TimeoutManagerKt
-
-
Method Summary
Modifier and Type Method Description final static JobstartTimer(CoroutineScope coroutineScope, Long timeoutMillis, Function0<Unit> timeOutCallback)Starts a timer with the given timeoutMillis. -
-
Method Detail
-
startTimer
final static Job startTimer(CoroutineScope coroutineScope, Long timeoutMillis, Function0<Unit> timeOutCallback)
Starts a timer with the given timeoutMillis.
- Parameters:
coroutineScope- The coroutine scope to run the timer in.timeoutMillis- The time in milliseconds for the timer.timeOutCallback- The lambda to invoke when the timer hits.- Returns:
The Job representing the timer, which can be canceled to stop the timer.
-
-
-
-