#include <ExponentialBackoff.hpp>
◆ ExponentialBackoff()
template<unsigned maxSteps> 
 
Creates an object helping you make exponentially (with base 2) backed off times.
- Parameters
- 
  
    | start | The start time in milliseconds |  | maxSteps | The max number of progressions we will take before stopping |  
 
For example, ExponentialBackoff(10ms, 3) would have the next() function return 10ms, 20ms, 40ms, 40ms, ..., 40ms 
 
 
◆ next()
template<unsigned maxSteps> 
 
Return the current number in the progression and increment the step until the next one (assuming we're not at the cap)
- Returns
- current step in milliseconds 
 
 
◆ reset()
template<unsigned maxSteps> 
 
Reset the progression back to its initial state 
 
 
The documentation for this class was generated from the following file: