diff --git a/NTPClient.cpp b/NTPClient.cpp index def941e..011c89c 100644 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -25,7 +25,7 @@ NTPClient::NTPClient(UDP& udp) { this->_udp = &udp; } -NTPClient::NTPClient(UDP& udp, int timeOffset) { +NTPClient::NTPClient(UDP& udp, long timeOffset) { this->_udp = &udp; this->_timeOffset = timeOffset; } @@ -35,13 +35,13 @@ NTPClient::NTPClient(UDP& udp, const char* poolServerName) { this->_poolServerName = poolServerName; } -NTPClient::NTPClient(UDP& udp, const char* poolServerName, int timeOffset) { +NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset) { this->_udp = &udp; this->_timeOffset = timeOffset; this->_poolServerName = poolServerName; } -NTPClient::NTPClient(UDP& udp, const char* poolServerName, int timeOffset, unsigned long updateInterval) { +NTPClient::NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval) { this->_udp = &udp; this->_timeOffset = timeOffset; this->_poolServerName = poolServerName; diff --git a/NTPClient.h b/NTPClient.h index cdbf55a..b9c6123 100644 --- a/NTPClient.h +++ b/NTPClient.h @@ -15,7 +15,7 @@ class NTPClient { const char* _poolServerName = "pool.ntp.org"; // Default time server int _port = NTP_DEFAULT_LOCAL_PORT; - int _timeOffset = 0; + long _timeOffset = 0; unsigned long _updateInterval = 60000; // In ms @@ -28,10 +28,10 @@ class NTPClient { public: NTPClient(UDP& udp); - NTPClient(UDP& udp, int timeOffset); + NTPClient(UDP& udp, long timeOffset); NTPClient(UDP& udp, const char* poolServerName); - NTPClient(UDP& udp, const char* poolServerName, int timeOffset); - NTPClient(UDP& udp, const char* poolServerName, int timeOffset, unsigned long updateInterval); + NTPClient(UDP& udp, const char* poolServerName, long timeOffset); + NTPClient(UDP& udp, const char* poolServerName, long timeOffset, unsigned long updateInterval); /** * Starts the underlying UDP client with the default local port