From df46e8485d65cc9dae9b959e828eec1eed36838e Mon Sep 17 00:00:00 2001 From: spv Date: Tue, 18 Nov 2025 10:29:15 -0500 Subject: change reporting logic, 1 per hour. add skeleton of report processing code. --- src/report.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/report.c') 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); } -- cgit v1.2.3