mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 13:25:45 +02:00
throttle: track time values more closely
Decaying averages by 10% every 5 minutes gives roughly a half-hour half-life to the rolling average. Speed that up to once per minute. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
d160edc15a
commit
2a1ed0b455
@ -326,7 +326,7 @@ bees_throttle(const double time_used, const char *const context)
|
||||
++this_time_count;
|
||||
// Keep the timing data fresh
|
||||
static Timer s_fresh_timer;
|
||||
if (s_fresh_timer.age() > 300) {
|
||||
if (s_fresh_timer.age() > 60) {
|
||||
s_fresh_timer.reset();
|
||||
this_time_count *= 0.9;
|
||||
this_time_used *= 0.9;
|
||||
|
Loading…
x
Reference in New Issue
Block a user