Measure max & min durations within the confines of MAX_SAMPLE_RUNS

This commit is contained in:
Lealem Amedie
2023-11-01 16:47:21 -06:00
parent 1303c0512c
commit 2cde843093

View File

@ -254,12 +254,12 @@
}\
else {\
delta = current_time(0) - prev;\
}\
if (runs < MAX_SAMPLE_RUNS) {\
if (max < delta)\
max = delta;\
else if (min > delta)\
min = delta;\
}\
if (runs < MAX_SAMPLE_RUNS) {\
deltas[runs] = delta;\
sum += delta;\
runs++;\