diff options
-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); |