Files
IoTManager/src/Clock.cpp

17 lines
361 B
C++
Raw Normal View History

2020-10-20 23:58:23 +03:00
#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);
}