added back missing function
This commit is contained in:
parent
110cb903a6
commit
9c8b1c697b
@ -14,6 +14,10 @@ void PeriodicHousekeepingHelper::initialize(float collectionInterval,
|
|||||||
changeCollectionInterval(collectionInterval);
|
changeCollectionInterval(collectionInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float PeriodicHousekeepingHelper::getCollectionIntervalInSeconds() const {
|
||||||
|
return collectionInterval;
|
||||||
|
}
|
||||||
|
|
||||||
bool PeriodicHousekeepingHelper::checkOpNecessary() {
|
bool PeriodicHousekeepingHelper::checkOpNecessary() {
|
||||||
if (hkGenerationCd.hasTimedOut()) {
|
if (hkGenerationCd.hasTimedOut()) {
|
||||||
hkGenerationCd.resetTimer();
|
hkGenerationCd.resetTimer();
|
||||||
@ -26,6 +30,8 @@ void PeriodicHousekeepingHelper::changeCollectionInterval(float newIntervalSecon
|
|||||||
uint32_t intervalMs = newIntervalSeconds * 1000;
|
uint32_t intervalMs = newIntervalSeconds * 1000;
|
||||||
if (newIntervalSeconds <= 0) {
|
if (newIntervalSeconds <= 0) {
|
||||||
intervalMs = minimumPeriodicInterval;
|
intervalMs = minimumPeriodicInterval;
|
||||||
|
newIntervalSeconds = static_cast<float>(minimumPeriodicInterval) / 1000.0;
|
||||||
}
|
}
|
||||||
|
collectionInterval = newIntervalSeconds;
|
||||||
hkGenerationCd.setTimeout(intervalMs);
|
hkGenerationCd.setTimeout(intervalMs);
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ class PeriodicHousekeepingHelper {
|
|||||||
private:
|
private:
|
||||||
LocalPoolDataSetBase* owner = nullptr;
|
LocalPoolDataSetBase* owner = nullptr;
|
||||||
Countdown hkGenerationCd;
|
Countdown hkGenerationCd;
|
||||||
|
float collectionInterval = 0.0;
|
||||||
|
|
||||||
dur_millis_t minimumPeriodicInterval = 0;
|
dur_millis_t minimumPeriodicInterval = 0;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user