arrow-fx-coroutines / arrow.fx.coroutines / Schedule / jittered
fun jittered(genRand: suspend () ->
Double
):
Schedule
<Input, Output>
@JvmName("jitteredDuration") @ExperimentalTime fun jittered(genRand: suspend () ->
Duration
):
Schedule
<Input, Output>
fun ~~jittered~~():
Schedule
<Input, Output>
Deprecated: Hidden for binary compatibility reasons
fun jittered(random:
Random
= Random.Default):
Schedule
<Input, Output>
Add random jitter to a schedule.
By requiring Kotlin’s Random as a parameter, this function is deterministic and testable. The result returned by Random.nextDouble between 0.0 and 1.0 is multiplied with the current duration.
Do you like Arrow?
✖