From 500f726357dfe9b1010abac033a408a2829a9624 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 23 Jul 2020 16:03:15 +0100 Subject: [PATCH] Change get_timestamp() to return int64_t instead of time_t which is uint32_t on ARMCC --- NTPClient.cpp | 2 +- NTPClient.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NTPClient.cpp b/NTPClient.cpp index 1f62f7f..c68f1c5 100644 --- a/NTPClient.cpp +++ b/NTPClient.cpp @@ -26,7 +26,7 @@ void NTPClient::set_server(const char* server, int port) { nist_server_port = port; } -time_t NTPClient::get_timestamp(int timeout) { +int64_t NTPClient::get_timestamp(int timeout) { const time_t TIME1970 = (time_t)2208988800UL; int ntp_send_values[12] = {0}; int ntp_recv_values[12] = {0}; diff --git a/NTPClient.h b/NTPClient.h index 8f755f5..000c563 100644 --- a/NTPClient.h +++ b/NTPClient.h @@ -23,7 +23,7 @@ class NTPClient { public: explicit NTPClient(NetworkInterface *interface = NULL); void set_server(const char* server, int port); - time_t get_timestamp(int timeout = 15000); + int64_t get_timestamp(int timeout = 15000); void network(NetworkInterface *interface); private: