summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-25 08:33:59 +0200
committerMax Kellermann <max@musicpd.org>2018-07-25 08:33:59 +0200
commita8ac8b25638b0dae65b8770de2725828e7372427 (patch)
tree7823869dcb938defcd5172f8acc6a3275648ebdb
parent78a65cf2817c6584a35789d46c45872c2557924e (diff)
TimePrint: remove unused time_t overload
-rw-r--r--src/TimePrint.cxx8
-rw-r--r--src/TimePrint.hxx8
2 files changed, 6 insertions, 10 deletions
diff --git a/src/TimePrint.cxx b/src/TimePrint.cxx
index a9e932a43..19115a6c6 100644
--- a/src/TimePrint.cxx
+++ b/src/TimePrint.cxx
@@ -22,13 +22,15 @@
#include "client/Response.hxx"
void
-time_print(Response &r, const char *name, time_t t)
+time_print(Response &r, const char *name,
+ std::chrono::system_clock::time_point t)
{
+ time_t t2 = std::chrono::system_clock::to_time_t(t);
#ifdef _WIN32
- const struct tm *tm2 = gmtime(&t);
+ const struct tm *tm2 = gmtime(&t2);
#else
struct tm tm;
- const struct tm *tm2 = gmtime_r(&t, &tm);
+ const struct tm *tm2 = gmtime_r(&t2, &tm);
#endif
if (tm2 == nullptr)
return;
diff --git a/src/TimePrint.hxx b/src/TimePrint.hxx
index e905473a7..979a4d22e 100644
--- a/src/TimePrint.hxx
+++ b/src/TimePrint.hxx
@@ -30,13 +30,7 @@ class Response;
* Write a line with a time stamp to the client.
*/
void
-time_print(Response &r, const char *name, time_t t);
-
-inline void
time_print(Response &r, const char *name,
- std::chrono::system_clock::time_point t)
-{
- time_print(r, name, std::chrono::system_clock::to_time_t(t));
-}
+ std::chrono::system_clock::time_point t);
#endif