summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-19 21:02:13 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-19 21:02:13 +0800
commitf79ea55743a623b309a9b9326d890519212ab93b (patch)
tree8971ce2d010b35efcb3321836888ad02f1654f10 /util
parentd0b2404d6d0b0935512cad1da370577a05493b0c (diff)
downloadpttbbs-f79ea55743a623b309a9b9326d890519212ab93b.tar
pttbbs-f79ea55743a623b309a9b9326d890519212ab93b.tar.gz
pttbbs-f79ea55743a623b309a9b9326d890519212ab93b.tar.bz2
pttbbs-f79ea55743a623b309a9b9326d890519212ab93b.tar.lz
pttbbs-f79ea55743a623b309a9b9326d890519212ab93b.tar.xz
pttbbs-f79ea55743a623b309a9b9326d890519212ab93b.tar.zst
pttbbs-f79ea55743a623b309a9b9326d890519212ab93b.zip
extract unit of login times
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2647 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/account.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/account.c b/util/account.c
index c15411b8..b7e5e728 100644
--- a/util/account.c
+++ b/util/account.c
@@ -100,6 +100,7 @@ main(int argc, char **argv)
int act[27]; /* 次數/累計時間/pointer */
time4_t now;
struct tm *ptime;
+ int per_hour_unit = 10;
attach_SHM();
nice(10);
@@ -169,7 +170,7 @@ main(int argc, char **argv)
hour = act[j];
if (hour && (max > hour) && (max - item <= hour)) {
my_outs(fp, buf, '3');
- fprintf(fp, "%-3d", hour / 10);
+ fprintf(fp, "%-3d", hour / per_hour_unit);
} else if (max <= hour) {
my_outs(fp, buf, '4');
fprintf(fp, "█ ");
@@ -180,7 +181,7 @@ main(int argc, char **argv)
}
fprintf(fp, " "
"0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23\n\n"
- "\t 單位: 10 人");
+ "\t 單位: %d 人", per_hour_unit);
fprintf(fp, " 總共上站人次:%-7d平均使用人數:%d\n", total, total / 24);
fclose(fp);