diff --git a/NTPClient.cpp b/NTPClient.cpp index b435855..675c728 100755 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -181,6 +181,11 @@ void NTPClient::setPoolServerName(const char* poolServerName) { this->_poolServerName = poolServerName; } +void NTPClient::setPoolServerIP(IPAddress poolServerIP) { + this->_poolServerIP = poolServerIP; + this->_poolServerName = NULL; +} + void NTPClient::sendNTPPacket() { // set all bytes in the buffer to 0 memset(this->_packetBuffer, 0, NTP_PACKET_SIZE); diff --git a/NTPClient.h b/NTPClient.h index a31d32f..09d3d7d 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 */