This commit is contained in:
2023-06-02 12:51:08 +02:00
commit 0e355fbe42
142 changed files with 10281 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
//
// Created by Stepan Usatiuk on 12.05.2023.
//
#include "RunningDiffAverage.h"
RunningDiffAverage::RunningDiffAverage(std::function<unsigned long long int()> getFunc, int max, int ms)
: runningAverage(
[this, get = std::move(getFunc)] {
auto cur = get();
auto calc = cur - prev;
prev = cur;
return calc;
},
max, ms) {
}
unsigned long long RunningDiffAverage::get() {
return runningAverage.get();
}