From c858df25ea6cdc7bc8ecb3a36abf54ab9ebad4b9 Mon Sep 17 00:00:00 2001 From: unai Date: Wed, 11 Mar 2026 08:09:33 +0000 Subject: [PATCH] fix: added missing jittering when producer is enabled --- src/core/Producer.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/Producer.cxx b/src/core/Producer.cxx index b43830e..a68e435 100644 --- a/src/core/Producer.cxx +++ b/src/core/Producer.cxx @@ -27,6 +27,14 @@ std::chrono::milliseconds Producer::compute_delay(SysfsStatus status) const { // when error = temp too high return hot; } + if (status == SysfsStatus::Enabled) + { + static std::random_device rd; + static std::mt19937 gen(rd()); + std::uniform_int_distribution dist(1000,5000); //jittered around 3s with +-2s + + return std::chrono::milliseconds(dist(gen)); + } else { return standard; -- 2.49.1