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:
+5
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user