Add end() API
This commit is contained in:
parent
3c1d6b1c18
commit
ab5d7ac9f8
@ -119,6 +119,10 @@ String NTPClient::getFormattedTime() {
|
|||||||
return hoursStr + ":" + minuteStr + ":" + secondStr;
|
return hoursStr + ":" + minuteStr + ":" + secondStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NTPClient::end() {
|
||||||
|
this->_udp->stop();
|
||||||
|
}
|
||||||
|
|
||||||
void NTPClient::sendNTPPacket() {
|
void NTPClient::sendNTPPacket() {
|
||||||
// set all bytes in the buffer to 0
|
// set all bytes in the buffer to 0
|
||||||
memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);
|
memset(this->_packetBuffer, 0, NTP_PACKET_SIZE);
|
||||||
|
@ -56,4 +56,9 @@ class NTPClient {
|
|||||||
* @return time as raw seconds
|
* @return time as raw seconds
|
||||||
*/
|
*/
|
||||||
unsigned long getRawTime();
|
unsigned long getRawTime();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stops the underlying UDP client
|
||||||
|
*/
|
||||||
|
void end();
|
||||||
};
|
};
|
||||||
|
@ -9,6 +9,7 @@ NTPClient KEYWORD1
|
|||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
begin KEYWORD2
|
begin KEYWORD2
|
||||||
|
end KEYWORD2
|
||||||
update KEYWORD2
|
update KEYWORD2
|
||||||
forceUpdate KEYWORD2
|
forceUpdate KEYWORD2
|
||||||
getDay KEYWORD2
|
getDay KEYWORD2
|
||||||
|
Loading…
Reference in New Issue
Block a user