Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a8ac8b25
Commit
a8ac8b25
authored
Jul 25, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TimePrint: remove unused time_t overload
parent
78a65cf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
TimePrint.cxx
src/TimePrint.cxx
+5
-3
TimePrint.hxx
src/TimePrint.hxx
+1
-7
No files found.
src/TimePrint.cxx
View file @
a8ac8b25
...
...
@@ -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
(
&
t
2
);
#else
struct
tm
tm
;
const
struct
tm
*
tm2
=
gmtime_r
(
&
t
,
&
tm
);
const
struct
tm
*
tm2
=
gmtime_r
(
&
t
2
,
&
tm
);
#endif
if
(
tm2
==
nullptr
)
return
;
...
...
src/TimePrint.hxx
View file @
a8ac8b25
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment