From c4661d927cde92b61cde6433db3f4da5d0f10293 Mon Sep 17 00:00:00 2001
From: Rainer Fritz <rain3rfritz@gmail.com>
Date: Sun, 11 Sep 2022 16:05:36 +0200
Subject: [PATCH] added setPoolServerIP

---
 NTPClient.cpp | 5 +++++
 NTPClient.h   | 7 +++++++
 2 files changed, 12 insertions(+)

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
      */