|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
10 #define _TIMEMANAGER_h
41 uint64_t time_sec =
clock () / 1000000L;
53 int64_t
adjustTime (int64_t t1r, int64_t t2r, int64_t t3r, int64_t t4r);
int64_t clock_us()
Gets local clock.
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 clock()
Gets local clock.
int64_t offset
Offet between node millis() and gateway time.
void reset()
Resets clock synchronization and sets values to initial status.