Initialize _timeOffset and _currentEpoc to zero

This commit is contained in:
Sandeep Mistry 2016-04-13 09:29:27 -04:00
parent 3c1d6b1c18
commit 89aa3359a2

View File

@ -13,11 +13,11 @@ class NTPClient {
const char* _poolServerName = "time.nist.gov"; // Default time server const char* _poolServerName = "time.nist.gov"; // Default time server
int _port = 1337; int _port = 1337;
int _timeOffset; int _timeOffset = 0;
unsigned int _updateInterval = 60000; // In ms unsigned int _updateInterval = 60000; // In ms
unsigned long _currentEpoc; // In s unsigned long _currentEpoc = 0; // In s
unsigned long _lastUpdate = 0; // In ms unsigned long _lastUpdate = 0; // In ms
byte _packetBuffer[NTP_PACKET_SIZE]; byte _packetBuffer[NTP_PACKET_SIZE];