Returns the delay in milliseconds for the given attempt (0-indexed).
attempt
int delayForAttempt(int attempt) { if (attempt < 0) return baseDelayMs; return baseDelayMs * (1 << attempt); }