11template <
int Window,
typename Clock>
64 if (elapsed > 4 * Window)
70 for (; elapsed > 0; --elapsed)
92template <
int HalfLife,
class Clock>
117 static_assert(HalfLife > 0,
"half life must be positive");
Clock::time_point time_point
void decay(time_point now)
void add(double value, time_point now)
double value(time_point now)
DecayWindow(time_point now)
value_type value(time_point now)
Retrieve the current value in normalized units.
Clock::duration::rep value_type
DecayingSample(time_point now)
value_type add(value_type value, time_point now)
Add a new sample.
Clock::time_point time_point
void decay(time_point now)
T duration_cast(T... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.