aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stats.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/stats.c b/src/stats.c
index a26976d31..c159fc4c1 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -28,18 +28,21 @@
Stats stats;
-void initStats(void) {
+void initStats(void)
+{
stats.daemonStart = time(NULL);
stats.numberOfSongs = 0;
}
-int printStats(FILE * fp) {
- myfprintf(fp,"artists: %li\n", getNumberOfTagItems(TAG_ITEM_ARTIST));
- myfprintf(fp,"albums: %li\n", getNumberOfTagItems(TAG_ITEM_ALBUM));
- myfprintf(fp,"songs: %i\n",stats.numberOfSongs);
- myfprintf(fp,"uptime: %li\n",time(NULL)-stats.daemonStart);
- myfprintf(fp,"playtime: %li\n",(long)(getPlayerTotalPlayTime()+0.5));
- myfprintf(fp,"db_playtime: %li\n",stats.dbPlayTime);
- myfprintf(fp,"db_update: %li\n",getDbModTime());
+int printStats(FILE * fp)
+{
+ myfprintf(fp, "artists: %li\n", getNumberOfTagItems(TAG_ITEM_ARTIST));
+ myfprintf(fp, "albums: %li\n", getNumberOfTagItems(TAG_ITEM_ALBUM));
+ myfprintf(fp, "songs: %i\n", stats.numberOfSongs);
+ myfprintf(fp, "uptime: %li\n", time(NULL) - stats.daemonStart);
+ myfprintf(fp, "playtime: %li\n",
+ (long)(getPlayerTotalPlayTime() + 0.5));
+ myfprintf(fp, "db_playtime: %li\n", stats.dbPlayTime);
+ myfprintf(fp, "db_update: %li\n", getDbModTime());
return 0;
}