add requestInterval, lastRequest

add requestInterval, lastRequest
This commit is contained in:
Vlad 2017-05-15 21:37:33 +05:00
parent d08cb88f10
commit 6fb0ced103

View File

@ -7,6 +7,7 @@
#define SEVENZYYEARS 2208988800UL
#define NTP_PACKET_SIZE 48
#define NTP_DEFAULT_LOCAL_PORT 1337
//#define DEBUG_NTPClient
class NTPClient {
private:
@ -18,9 +19,11 @@ class NTPClient {
int _timeOffset = 0;
unsigned int _updateInterval = 60000; // In ms
unsigned int _requestInterval = 1000; // In ms
unsigned long _currentEpoc = 0; // In s
unsigned long _lastUpdate = 0; // In ms
unsigned long _lastRequest = 0; // In ms
byte _packetBuffer[NTP_PACKET_SIZE];