TimePrint: std::chrono::system_clock support
This commit is contained in:
parent
781487c4dd
commit
3b7f6641d2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user