stats: use GTimer instead of time(NULL)

time(NULL) shows the wrong results when the machine's clock is
changed.
This commit is contained in:
Max Kellermann
2009-01-18 15:40:53 +01:00
parent 14ca99b224
commit 004dfddca3
3 changed files with 13 additions and 3 deletions
+5 -1
View File
@@ -19,10 +19,12 @@
#ifndef MPD_STATS_H
#define MPD_STATS_H
#include <glib.h>
struct client;
struct stats {
unsigned long start_time;
GTimer *timer;
/** number of song files in the music directory */
unsigned song_count;
@@ -42,6 +44,8 @@ extern struct stats stats;
void stats_global_init(void);
void stats_global_finish(void);
void stats_update(void);
int stats_print(struct client *client);