delayForAttempt method

int delayForAttempt(
  1. int attempt
)

Returns the delay in milliseconds for the given attempt (0-indexed).

Implementation

int delayForAttempt(int attempt) {
  if (attempt < 0) return baseDelayMs;
  return baseDelayMs * (1 << attempt);
}