ref: e35c21e8703f96642fa70239b9ef1ef6f15d2922
parent: 8490b5e87db6bbc93bd070f42e25390ab6a79a37
author: Olav Sørensen <olav.sorensen@live.no>
date: Fri Mar 3 08:31:57 EST 2023
Reset HPC timers every half an hour instead of every hour
--- a/src/ft2_hpc.c
+++ b/src/ft2_hpc.c
@@ -98,7 +98,7 @@
hpc->durationInt = hpcFreq.freq64 / hz;
hpc->durationFrac = getFrac64FromU64DivU32(hpcFreq.freq64, hz) >> 1;
- hpc->resetFrame = hz * 3600; // reset counters every hour
+ hpc->resetFrame = hz * (60 * 30); // reset counters every half an hour
}
void hpc_ResetCounters(hpc_t *hpc)
@@ -151,8 +151,8 @@
/* The counter ("endTimeInt") can accumulate major errors after a couple of hours,
** since each frame is not happening at perfect intervals.
- ** To fix this, reset the counter's int & frac once every hour. We should only get
- ** up to one frame of stutter while they are resetting, then it's back to normal.
+ ** To fix this, reset the counter's int & frac once every half an hour. We should only
+ ** get up to one frame of stutter while they are resetting, then it's back to normal.
*/
hpc->frameCounter++;
if (hpc->frameCounter >= hpc->resetFrame)