mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
17 lines
408 B
C++
17 lines
408 B
C++
#include "Clock.h"
|
|
|
|
#include "Global.h"
|
|
|
|
Clock* timeNow;
|
|
void clockInit() {
|
|
timeNow = new Clock;
|
|
timeNow->setNtpPool(jsonReadStr(configSetupJson, "ntp"));
|
|
timeNow->setTimezone(jsonReadStr(configSetupJson, "timezone").toInt());
|
|
ts.add(
|
|
TIME_SYNC, 30000, [&](void*) {
|
|
timeNow->hasSync();
|
|
},
|
|
nullptr, true);
|
|
SerialPrint("I", F("NTP"), F("Clock Init"));
|
|
}
|