Skip to content

Commit 6bbeb69

Browse files
authored
Added Respect the ToS of pool.ntp.org
The Update Interval was set by default to 60 seconds, but the ToS of pool.ntp.org say it need to be 30min at minimum
1 parent eaabe83 commit 6bbeb69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

NTPClient.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ class NTPClient {
1818
unsigned int _port = NTP_DEFAULT_LOCAL_PORT;
1919
long _timeOffset = 0;
2020

21-
unsigned long _updateInterval = 60000; // In ms
21+
unsigned long _updateInterval = 3600000; // In ms (1 hour : Defined by ToS of pool.ntp.org)
2222

23-
unsigned long _currentEpoc = 0; // In s
24-
unsigned long _lastUpdate = 0; // In ms
23+
unsigned long _currentEpoc = 0; // In s
24+
unsigned long _lastUpdate = 0; // In ms
2525

2626
byte _packetBuffer[NTP_PACKET_SIZE];
2727

0 commit comments

Comments
 (0)