TimePrint: remove unused time_t overload
This commit is contained in:
parent
78a65cf281
commit
a8ac8b2563
@ -22,13 +22,15 @@
|
|||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
|
|
||||||
void
|
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
|
#ifdef _WIN32
|
||||||
const struct tm *tm2 = gmtime(&t);
|
const struct tm *tm2 = gmtime(&t2);
|
||||||
#else
|
#else
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
const struct tm *tm2 = gmtime_r(&t, &tm);
|
const struct tm *tm2 = gmtime_r(&t2, &tm);
|
||||||
#endif
|
#endif
|
||||||
if (tm2 == nullptr)
|
if (tm2 == nullptr)
|
||||||
return;
|
return;
|
||||||
|
@ -30,13 +30,7 @@ class Response;
|
|||||||
* Write a line with a time stamp to the client.
|
* Write a line with a time stamp to the client.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
time_print(Response &r, const char *name, time_t t);
|
|
||||||
|
|
||||||
inline void
|
|
||||||
time_print(Response &r, const char *name,
|
time_print(Response &r, const char *name,
|
||||||
std::chrono::system_clock::time_point t)
|
std::chrono::system_clock::time_point t);
|
||||||
{
|
|
||||||
time_print(r, name, std::chrono::system_clock::to_time_t(t));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user