added stop function

This commit is contained in:
Martin Brodbeck 2023-01-04 10:16:35 +01:00
parent 7223954af8
commit 710f1e815f
2 changed files with 6 additions and 1 deletions

View file

@ -36,4 +36,8 @@ void NtpClient::setDateTime() {
while (!rtc_running()) {
sleep_ms(500);
}
}
}
void NtpClient::stop() {
sntp_stop();
}

View file

@ -9,6 +9,7 @@ extern "C" void set_system_time(u32_t sec);
class NtpClient {
public:
static void setDateTime();
static void stop();
private:
NtpClient() {} // Disallow creating an instance of this object