mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Fix overtime computation logic broken in PR #1312
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
+2
-2
@@ -71,8 +71,8 @@ void initOverTime(void)
|
||||
time_t now = time(NULL);
|
||||
|
||||
// Get the centered timestamp of the current timestamp
|
||||
time_t first_slot_ts = now - now % OVERTIME_INTERVAL + (OVERTIME_INTERVAL / 2);
|
||||
time_t last_slot_ts = first_slot_ts + (OVERTIME_SLOTS-1) * OVERTIME_INTERVAL;
|
||||
const time_t last_slot_ts = now - now % OVERTIME_INTERVAL + (OVERTIME_INTERVAL / 2);
|
||||
const time_t first_slot_ts = last_slot_ts - (OVERTIME_SLOTS-1) * OVERTIME_INTERVAL;
|
||||
|
||||
if(config.debug & DEBUG_OVERTIME)
|
||||
logg("initOverTime(): Initializing %i slots from %llu to %llu",
|
||||
|
||||
Reference in New Issue
Block a user