Oldest timestamp is (OVERTIME_SLOTS-1) times the OVERTIME_INTERVAL in the past

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2022-05-02 19:07:38 +02:00
parent f4a14eb495
commit 3b06f087b1
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ void initOverTime(void)
// previous GC interval next GC int. 5 minutes less than full
// vvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvv
const time_t newest = now - now % GCinterval + GCinterval - (OVERTIME_INTERVAL / 2);
const time_t oldest = newest - OVERTIME_SLOTS * OVERTIME_INTERVAL;
// Oldest timestamp is (OVERTIME_SLOTS-1) times the OVERTIME_INTERVAL in the past
const time_t oldest = newest - (OVERTIME_SLOTS-1) * OVERTIME_INTERVAL;
if(config.debug & DEBUG_OVERTIME)
{