From 712c58c18e5399416650a356c39d4ee6f8dfd9db Mon Sep 17 00:00:00 2001 From: bitsy <36607587+bitsy@users.noreply.github.com> Date: Sun, 16 Sep 2018 21:11:26 -0700 Subject: [PATCH] Update NTPClient.cpp The NTPClient method update() has been changed to only return "TRUE" after a successful update. The following conditions return "FALSE": - Interval duration requirement not met - forceUpdate() times out --- NTPClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NTPClient.cpp b/NTPClient.cpp index 87b7a53..79924c7 100644 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -89,7 +89,7 @@ bool NTPClient::forceUpdate() { this->_currentEpoc = secsSince1900 - SEVENZYYEARS; - return true; + return true; // return true after successful update } bool NTPClient::update() { @@ -98,7 +98,7 @@ bool NTPClient::update() { if (!this->_udpSetup) this->begin(); // setup the UDP client if needed return this->forceUpdate(); } - return true; + return false; // return false if update does not occur } unsigned long NTPClient::getEpochTime() const {