aboutsummaryrefslogtreecommitdiff
path: root/src/report.c
diff options
context:
space:
mode:
authorspv <spv@spv.sh>2025-11-18 10:29:15 -0500
committerspv <spv@spv.sh>2025-11-18 10:29:15 -0500
commitdf46e8485d65cc9dae9b959e828eec1eed36838e (patch)
treeb2a1816784a55dc46b6133af544b0c0bd357e534 /src/report.c
parent89928b63f48116604bddf10763123ee979f038cc (diff)
change reporting logic, 1 per hour. add skeleton of report processing code.
Diffstat (limited to 'src/report.c')
-rw-r--r--src/report.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/report.c b/src/report.c
index 060e98a..ea238a9 100644
--- a/src/report.c
+++ b/src/report.c
@@ -10,7 +10,7 @@ static double work_time;
static double idle_time;
#define REPORT(t, s, v...) do { \
- fprintf(report_fp, "%s: " t "\n", s, v); \
+ fprintf(report_fp, "%s," t "\n", s, v); \
} while (0)
void gen_report(FILE* report_fp) {
@@ -40,9 +40,9 @@ void gen_report(FILE* report_fp) {
}
REPORT("%d", "total keypresses", keypresses.length);
- REPORT("%.1fs", "work time", work_time);
- REPORT("%.1f k/s", "avg keys/sec", keypresses.length / work_time);
- REPORT("%.1fs", "idle time", idle_time);
+ REPORT("%f", "work time", work_time);
+ REPORT("%f", "avg keys/sec", keypresses.length / work_time);
+ REPORT("%f", "idle time", idle_time);
fflush(report_fp);
}