MCPcopy Create free account
hub / github.com/arduino-libraries/NTPClient / update

Method update

NTPClient.cpp:120–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120bool 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
129bool NTPClient::isTimeSet() const {
130 return (this->_lastUpdate != 0); // returns true if the time has been set, else false

Callers

nothing calls this directly

Calls 2

beginMethod · 0.95
forceUpdateMethod · 0.95

Tested by

no test coverage detected