summaryrefslogtreecommitdiff
path: root/src/Stats.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-12-28 10:22:15 +0100
committerMax Kellermann <max@musicpd.org>2016-12-28 10:22:15 +0100
commit8f4769d2acc46c5ef51ab376c7c0469364f7d095 (patch)
treeb75409699491181997b4223c48d8f36d6664d504 /src/Stats.cxx
parenta3ca9963a55d13492a784fe66056c12bf328f447 (diff)
Stats: initialize start_time automatically
Diffstat (limited to 'src/Stats.cxx')
-rw-r--r--src/Stats.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx
index a0a046b93..29f1c3f77 100644
--- a/src/Stats.cxx
+++ b/src/Stats.cxx
@@ -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()
{