Created
May 29, 2018 22:14
-
-
Save alex-okrushko/2220571845e1e1db991f0ab42e389992 to your computer and use it in GitHub Desktop.
example of a function that calculated delay for each iteration in exponential backoff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calculateDelay(iteration, initialInterval) { | |
return Math.pow(2, iteration) * initialInterval; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment