public class FibonacciInterval implements Interval
Fibonacci delay implements a delay where each duration is calculated as a multiplier of the fibonacci sequence, 0, 1, 1, 2, 3, 5....
Some people start fib at 0, some at 1. This implementation starts with 0 as per https://en.wikipedia.org/wiki/Fibonacci_number
| Constructor and Description |
|---|
FibonacciInterval(java.time.Duration base,
int offset)
Fibonacci delay implements a delay where each duration is calculated as a multiplier
of the fibonacci sequence, 0, 1, 1, 2, 3, 5....
|
| Modifier and Type | Method and Description |
|---|---|
java.time.Duration |
next(int count)
Returns the next delay as a Duration.
|
public FibonacciInterval(java.time.Duration base,
int offset)
Fibonacci delay implements a delay where each duration is calculated as a multiplier of the fibonacci sequence, 0, 1, 1, 2, 3, 5....
Some people start fib at 0, some at 1. This implementation starts with 0 as per https://en.wikipedia.org/wiki/Fibonacci_number
base - The duration that is multiplied by the fibonacci valueoffset - Added to the count, so if the offset is 4, then the first value will be the 4th fib number.offset - Added to the count, so if the offset is 4, then the first value will be the 4th fib number.base - The duration that is multiplied by the fibonacci value