aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats.c
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2006-07-20 16:02:40 +0000
committerAvuton Olrich <avuton@gmail.com>2006-07-20 16:02:40 +0000
commit29a25b9933b32800f58dd73d5d1fc21993071c92 (patch)
tree4f456a6f8e44d42acc289c35534ea3e59c0aa96f /src/stats.c
parent099f0e103f7591eef81183292d704b3a77a99018 (diff)
downloadmpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.gz
mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.tar.xz
mpd-29a25b9933b32800f58dd73d5d1fc21993071c92.zip
Add mpd-indent.sh
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
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;
}