aboutsummaryrefslogtreecommitdiffstats
path: root/src/Stats.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-22 00:10:53 +0100
committerMax Kellermann <max@duempel.org>2013-11-22 00:10:53 +0100
commitb9169a5670c4cb603b25f0b07e93d9739c5b06f8 (patch)
tree8f41331ef800513ece19d0b88a90d30973a1d672 /src/Stats.cxx
parent2ecd5fa28d05e20e7ef281ccd6760d73cbc04e8d (diff)
downloadmpd-b9169a5670c4cb603b25f0b07e93d9739c5b06f8.tar.gz
mpd-b9169a5670c4cb603b25f0b07e93d9739c5b06f8.tar.xz
mpd-b9169a5670c4cb603b25f0b07e93d9739c5b06f8.zip
Stats: move the GTimer variable out of struct stats
Diffstat (limited to '')
-rw-r--r--src/Stats.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Stats.cxx b/src/Stats.cxx
index 93795aee5..63be2a7bc 100644
--- a/src/Stats.cxx
+++ b/src/Stats.cxx
@@ -30,16 +30,17 @@
#include <glib.h>
+static GTimer *uptime;
static struct stats stats;
void stats_global_init(void)
{
- stats.timer = g_timer_new();
+ uptime = g_timer_new();
}
void stats_global_finish(void)
{
- g_timer_destroy(stats.timer);
+ g_timer_destroy(uptime);
}
void stats_update(void)
@@ -77,7 +78,7 @@ stats_print(Client &client)
stats.artist_count,
stats.album_count,
stats.song_count,
- (long)g_timer_elapsed(stats.timer, NULL),
+ (long)g_timer_elapsed(uptime, NULL),
(long)(client.player_control.GetTotalPlayTime() + 0.5),
stats.song_duration);