 |
EnigmaIOT
0.9.3
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
10 #define _TIMEMANAGER_h
40 uint64_t time_sec =
clock () / 1000;
52 int64_t
adjustTime (int64_t t1r, int64_t t2r, int64_t t3r, int64_t t4r);
bool isTimeAdjusted()
Gets synchronization status.
time_t unixtime()
Gets local clock in seconds. It returns millis() / 1000 if not synchronized, local clock otherwise....
int64_t adjustTime(int64_t t1r, int64_t t2r, int64_t t3r, int64_t t4r)
Gets delay between Gateway time and local clock and adjust local clock accordingly....
int64_t roundTripDelay
Propagation delay between Node and Gateway.
int64_t getDelay()
Gets propagation + processing delay between Node and Gateway in milliseconds.
TimeManagerClass TimeManager
bool timeIsAdjusted
Indicates if time has been synchronized.
int64_t getOffset()
Gets current offset to calculate clock, in milliseconds.
int64_t setOrigin()
Inits time synchronization getting local clock to be assigned to T1.
int64_t clock()
Gets local clock. It returns millis() if not synchronized, local clock otherwise.
int64_t offset
Offet between node millis() and gateway time.
void reset()
Resets clock synchronization and sets values to initial status.