Skip to content

Instantly share code, notes, and snippets.

@alex-okrushko
Created May 29, 2018 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alex-okrushko/2220571845e1e1db991f0ab42e389992 to your computer and use it in GitHub Desktop.
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
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