Skip to content

Commit 89aa335

Browse files
committed
Initialize _timeOffset and _currentEpoc to zero
1 parent 3c1d6b1 commit 89aa335

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

NTPClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ class NTPClient {
1313

1414
const char* _poolServerName = "time.nist.gov"; // Default time server
1515
int _port = 1337;
16-
int _timeOffset;
16+
int _timeOffset = 0;
1717

1818
unsigned int _updateInterval = 60000; // In ms
1919

20-
unsigned long _currentEpoc; // In s
20+
unsigned long _currentEpoc = 0; // In s
2121
unsigned long _lastUpdate = 0; // In ms
2222

2323
byte _packetBuffer[NTP_PACKET_SIZE];

0 commit comments

Comments
 (0)