fibonacciBackoffDelay

fun fibonacciBackoffDelay(baseDelay: Duration, start: Pair<Int, Int> = 0 to 1): DelayStrategy

Creates a DelayStrategy with delays that increase by the Fibonacci sequence multiplied by the baseDelay.

Note: for the default start pair of (0, 1) the first delay (index 0) will always be Duration.ZERO and the second delay (index 1) will be baseDelay

Return

A DelayStrategy with Fibonacci-based delays.

Since

1.0.0

Parameters

baseDelay

The delay unit used for each Fibonacci number.

start

The initial fibonacci sequence pair, defaults to (0, 1)


A property extension that converts the Duration to a Fibonacci-based DelayStrategy.

Since

1.0.0

See also