TimePrint: std::chrono::system_clock support

This commit is contained in:
Max Kellermann 2017-02-10 23:46:57 +01:00
parent 781487c4dd
commit 3b7f6641d2

View File

@ -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