Optimization

This commit is contained in:
Dmitry Borisenko
2020-10-20 23:58:23 +03:00
parent a5171f1178
commit 29e5a55ad3
14 changed files with 63 additions and 121 deletions

16
src/Clock.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "Clock.h"
#include "Global.h"
Clock* timeNow;
void clock_init() {
timeNow = new Clock;
timeNow->setNtpPool(jsonReadStr(configSetupJson, "ntp"));
timeNow->setTimezone(jsonReadStr(configSetupJson, "timezone").toInt());
ts.add(
TIME_SYNC, 30000, [&](void*) {
timeNow->hasSync();
},
nullptr, true);
}