#pragma once
#include
namespace base {
/// Exponential backoff implementation.
/// Backoff time is calculated using the classicial t = bᶜ formula.
struct Backoff {
explicit constexpr Backoff(double base = 2.) : base(base) {};
Awaitable Delay();
inline void Reset() { count = 0; }
private:
double base {};
u32 count {};
};
} // namespace base