diff --git a/src/ntp_client.cpp b/src/ntp_client.cpp index 3a53db6..bc2ab15 100644 --- a/src/ntp_client.cpp +++ b/src/ntp_client.cpp @@ -36,4 +36,8 @@ void NtpClient::setDateTime() { while (!rtc_running()) { sleep_ms(500); } -} \ No newline at end of file +} + +void NtpClient::stop() { + sntp_stop(); +} diff --git a/src/ntp_client.h b/src/ntp_client.h index dd4da70..b4c81bc 100644 --- a/src/ntp_client.h +++ b/src/ntp_client.h @@ -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