Off-by-one error in the json interval calculation.

This commit is contained in:
Oliver Jowett 2014-11-23 17:22:34 +00:00
parent ebab2c0e11
commit 2abc386895

View file

@ -601,7 +601,7 @@ void backgroundTasks(void) {
if (Modes.json_path && Modes.json_interval > 0) { if (Modes.json_path && Modes.json_interval > 0) {
time_t now = time(NULL); time_t now = time(NULL);
if (now > next_json) { if (now >= next_json) {
modesWriteJson(Modes.json_path); modesWriteJson(Modes.json_path);
next_json = now + Modes.json_interval; next_json = now + Modes.json_interval;
} }