added stop function
This commit is contained in:
parent
7223954af8
commit
710f1e815f
2 changed files with 6 additions and 1 deletions
|
@ -36,4 +36,8 @@ void NtpClient::setDateTime() {
|
||||||
while (!rtc_running()) {
|
while (!rtc_running()) {
|
||||||
sleep_ms(500);
|
sleep_ms(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NtpClient::stop() {
|
||||||
|
sntp_stop();
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ extern "C" void set_system_time(u32_t sec);
|
||||||
class NtpClient {
|
class NtpClient {
|
||||||
public:
|
public:
|
||||||
static void setDateTime();
|
static void setDateTime();
|
||||||
|
static void stop();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NtpClient() {} // Disallow creating an instance of this object
|
NtpClient() {} // Disallow creating an instance of this object
|
||||||
|
|
Loading…
Reference in a new issue