From 3b7f6641d2d4abb53496805477a9e11d3dd98fbd Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Fri, 10 Feb 2017 23:46:57 +0100
Subject: [PATCH] TimePrint: std::chrono::system_clock support

---
 src/TimePrint.hxx | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/TimePrint.hxx b/src/TimePrint.hxx
index c98634a7a..e905473a7 100644
--- a/src/TimePrint.hxx
+++ b/src/TimePrint.hxx
@@ -20,6 +20,8 @@
 #ifndef MPD_TIME_PRINT_HXX
 #define MPD_TIME_PRINT_HXX
 
+#include <chrono>
+
 #include <time.h>
 
 class Response;
@@ -30,4 +32,11 @@ class Response;
 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));
+}
+
 #endif