TimePrint: remove unused time_t overload
This commit is contained in:
parent
78a65cf281
commit
a8ac8b2563
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user