#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); }