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
8f4769d2
Commit
8f4769d2
authored
Dec 28, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stats: initialize start_time automatically
parent
a3ca9963
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
17 deletions
+1
-17
Main.cxx
src/Main.cxx
+0
-2
Stats.cxx
src/Stats.cxx
+1
-12
Stats.hxx
src/Stats.hxx
+0
-3
No files found.
src/Main.cxx
View file @
8f4769d2
...
...
@@ -56,7 +56,6 @@
#include "config/ConfigDefaults.hxx"
#include "config/ConfigOption.hxx"
#include "config/ConfigError.hxx"
#include "Stats.hxx"
#include "util/RuntimeError.hxx"
#ifdef ENABLE_DAEMON
...
...
@@ -442,7 +441,6 @@ try {
glue_daemonize_init
(
&
options
);
#endif
stats_global_init
();
TagLoadConfig
();
log_init
(
options
.
verbose
,
options
.
log_stderr
);
...
...
src/Stats.cxx
View file @
8f4769d2
...
...
@@ -34,7 +34,7 @@
* The monotonic time stamp when MPD was started. It is used to
* calculate the uptime.
*/
static
unsigned
start_time
;
static
const
unsigned
start_time
=
MonotonicClockS
()
;
#endif
#ifdef ENABLE_DATABASE
...
...
@@ -47,17 +47,6 @@ enum class StatsValidity : uint8_t {
static
StatsValidity
stats_validity
=
StatsValidity
::
INVALID
;
#endif
void
stats_global_init
(
void
)
{
#ifndef WIN32
start_time
=
MonotonicClockS
();
#endif
}
#ifdef ENABLE_DATABASE
void
stats_invalidate
()
{
...
...
src/Stats.hxx
View file @
8f4769d2
...
...
@@ -24,9 +24,6 @@ class Response;
struct
Partition
;
void
stats_global_init
();
void
stats_invalidate
();
void
...
...
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