From 6fb0ced103237bc71800838edf6ddf267c2b133a Mon Sep 17 00:00:00 2001 From: Vlad Date: Mon, 15 May 2017 21:37:33 +0500 Subject: [PATCH] add requestInterval, lastRequest add requestInterval, lastRequest --- NTPClient.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NTPClient.h b/NTPClient.h index 225cac6..0b707a8 100644 --- a/NTPClient.h +++ b/NTPClient.h @@ -7,6 +7,7 @@ #define SEVENZYYEARS 2208988800UL #define NTP_PACKET_SIZE 48 #define NTP_DEFAULT_LOCAL_PORT 1337 +//#define DEBUG_NTPClient class NTPClient { private: @@ -17,10 +18,12 @@ class NTPClient { int _port = NTP_DEFAULT_LOCAL_PORT; int _timeOffset = 0; - unsigned int _updateInterval = 60000; // In ms + 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];