Add end() API

This commit is contained in:
Sandeep Mistry 2016-04-12 10:45:21 -04:00
parent 5eff0bd78e
commit 20bcfe4c6a
3 changed files with 10 additions and 0 deletions

View File

@ -128,6 +128,10 @@ String NTPClient::getFormattedTime() {
return hoursStr + ":" + minuteStr + ":" + secondStr;
}
void NTPClient::end() {
this->_udp->stop();
}
void NTPClient::sendNTPPacket() {
// set all bytes in the buffer to 0
memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);

View File

@ -67,4 +67,9 @@ class NTPClient {
* @return time as raw seconds
*/
unsigned long getRawTime();
/**
* Stops the underlying UDP client
*/
void end();
};

View File

@ -9,6 +9,7 @@ NTPClient KEYWORD1
#######################################
begin KEYWORD2
end KEYWORD2
update KEYWORD2
forceUpdate KEYWORD2
getDay KEYWORD2