| 118 | } |
| 119 | |
| 120 | bool NTPClient::update() { |
| 121 | if ((millis() - this->_lastUpdate >= this->_updateInterval) // Update after _updateInterval |
| 122 | || this->_lastUpdate == 0) { // Update if there was no update yet. |
| 123 | if (!this->_udpSetup || this->_port != NTP_DEFAULT_LOCAL_PORT) this->begin(this->_port); // setup the UDP client if needed |
| 124 | return this->forceUpdate(); |
| 125 | } |
| 126 | return false; // return false if update does not occur |
| 127 | } |
| 128 | |
| 129 | bool NTPClient::isTimeSet() const { |
| 130 | return (this->_lastUpdate != 0); // returns true if the time has been set, else false |
nothing calls this directly
no test coverage detected