diff options
Diffstat (limited to 'keyboards/crkbd/keymaps/lib/timelogger.c')
-rw-r--r-- | keyboards/crkbd/keymaps/lib/timelogger.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/keyboards/crkbd/keymaps/lib/timelogger.c b/keyboards/crkbd/keymaps/lib/timelogger.c index 0e22bafe7f..69828a3a08 100644 --- a/keyboards/crkbd/keymaps/lib/timelogger.c +++ b/keyboards/crkbd/keymaps/lib/timelogger.c @@ -1,17 +1,16 @@ +#include <stdio.h> #include "crkbd.h" -char timelog[40] = {}; +char timelog_str[24] = {}; int last_time = 0; int elapsed_time = 0; -void set_timelog(void) -{ +void set_timelog(void) { elapsed_time = timer_elapsed(last_time); last_time = timer_read(); - snprintf(timelog, sizeof(timelog), "lt:%5d, et:%5d", last_time, elapsed_time); + snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); } -char *read_timelog(void) -{ - return timelog; +const char *read_timelog(void) { + return timelog_str; } |