Compare commits
No commits in common. "main" and "fix/readme_licenses" have entirely different histories.
main
...
fix/readme
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include "Producer.hpp"
|
#include "Producer.hpp"
|
||||||
|
|
||||||
#include <random>
|
|
||||||
|
|
||||||
#include "SysfsRead.hpp"
|
#include "SysfsRead.hpp"
|
||||||
|
|
||||||
Producer::Producer(const std::filesystem::path& sysfs_path,
|
Producer::Producer(const std::filesystem::path& sysfs_path,
|
||||||
@ -29,14 +27,6 @@ std::chrono::milliseconds Producer::compute_delay(SysfsStatus status) const
|
|||||||
{ // when error = temp too high
|
{ // when error = temp too high
|
||||||
return hot;
|
return hot;
|
||||||
}
|
}
|
||||||
if (status == SysfsStatus::Enabled)
|
|
||||||
{
|
|
||||||
static std::random_device rd;
|
|
||||||
static std::mt19937 gen(rd());
|
|
||||||
std::uniform_int_distribution<int> dist(1000,5000); //jittered around 3s with +-2s
|
|
||||||
|
|
||||||
return std::chrono::milliseconds(dist(gen));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return standard;
|
return standard;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user