diff --git a/src/ntp_client.cpp b/src/ntp_client.cpp index bc2ab15..d187a5f 100644 --- a/src/ntp_client.cpp +++ b/src/ntp_client.cpp @@ -37,7 +37,3 @@ void NtpClient::setDateTime() { sleep_ms(500); } } - -void NtpClient::stop() { - sntp_stop(); -} diff --git a/src/ntp_client.h b/src/ntp_client.h index b4c81bc..be1183f 100644 --- a/src/ntp_client.h +++ b/src/ntp_client.h @@ -8,9 +8,11 @@ extern "C" void set_system_time(u32_t sec); class NtpClient { public: + NtpClient() = delete; static void setDateTime(); static void stop(); private: - NtpClient() {} // Disallow creating an instance of this object -}; \ No newline at end of file +}; + +inline void NtpClient::stop() { sntp_stop(); } \ No newline at end of file