15 template <
typename ChronoType>
30 double divisor = 2.0,
double jitter_factor = 0.2)
62 using seconds_double = std::chrono::duration<double, std::chrono::seconds::period>;
63 return std::chrono::duration_cast<seconds_double>(
current_delay_).count() + jitter;
99 std::default_random_engine
rng_;
109 template <
typename ChronoType>
120 constexpr LinearBackoff(ChronoType initial_delay, ChronoType max_delay, ChronoType step)
138 using seconds_double = std::chrono::duration<double, std::chrono::seconds::period>;
139 return std::chrono::duration_cast<seconds_double>(
current_delay_).count();