diff --git a/NTPClient.cpp b/NTPClient.cpp index 760e142..82207ba 100755 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -174,7 +174,12 @@ void NTPClient::setUpdateInterval(unsigned long updateInterval) { } void NTPClient::setPoolServerName(const char* poolServerName) { - this->_poolServerName = poolServerName; + this->_poolServerName = poolServerName; +} + +void NTPClient::setPoolServerIP(IPAddress poolServerIP) { + this->_poolServerName = NULL; + this->_poolServerIP = poolServerIP; } void NTPClient::sendNTPPacket() { diff --git a/NTPClient.h b/NTPClient.h index b518c28..bc325d3 100755 --- a/NTPClient.h +++ b/NTPClient.h @@ -44,6 +44,13 @@ class NTPClient { */ void setPoolServerName(const char* poolServerName); + /** + * Set time server IP + * + * @param poolServerIP + */ + void setPoolServerIP(IPAddress poolServerIP); + /** * Set random local port */