diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-19 21:02:13 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-19 21:02:13 +0800 |
commit | f79ea55743a623b309a9b9326d890519212ab93b (patch) | |
tree | 8971ce2d010b35efcb3321836888ad02f1654f10 /util | |
parent | d0b2404d6d0b0935512cad1da370577a05493b0c (diff) | |
download | pttbbs-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.c | 5 |
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, " [32m" "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 [34m單位: [37m10[34m 人"); + "\t [34m單位: [37m%d[34m 人", per_hour_unit); fprintf(fp, " 總共上站人次:[37m%-7d[34m平均使用人數:[37m%d\n", total, total / 24); fclose(fp); |