mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 14:42:18 +03:00
Optimization
This commit is contained in:
16
src/Clock.cpp
Normal file
16
src/Clock.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user