1
0
Fork 0
forked from forks/qmk_firmware
qmk_firmware/keyboards/lily58/lib/timelogger.c
James Young fced377ac0
2020 May 30 Breaking Changes Update ()
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` ()

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` ()

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` ()

* Migrate `ACTION_LAYER_MODS` to `LM()` ()

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` ()

* Convert V-USB usbdrv to a submodule ()

* Unify Tap Hold functions and documentation ()

* Changing board names to prevent confusion ()

* Move the Keyboardio Model01 to a keyboardio/ subdir ()

* Move spaceman keyboards ()

* Migrate miscellaneous `fn_actions` entries ()

* Migrate `ACTION_MODS_KEY` to chained mod keycodes ()

* Organizing my keyboards (plaid, tartan, ergoinu) ()

* Refactor Lily58 to use split_common ()

* Refactor zinc to use split_common ()

* Add a message if bin/qmk doesn't work ()

* Fix conflicting types for 'tfp_printf' ()

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup ()

* Refactor and updates to TKC1800 code ()

* Switch to qmk forks for everything ()

* audio refactor: replace deprecated PLAY_NOTE_ARRAY ()

* Audio enable corrections (2/3) ()

* Split HHKB to ANSI and JP layouts and Add VIA support for each ()

* Audio enable corrections (Part 4) ()

* Fix typo from PR7114 ()

* Augment future branch Changelogs ()

* Revert "Branch point for 2020 May 30 Breaking Change"
2020-05-30 13:14:59 -07:00

18 lines
373 B
C

#include <stdio.h>
#include "timer.h"
#include "lily58.h"
char timelog_str[24] = {};
int last_time = 0;
int elapsed_time = 0;
void set_timelog(void) {
elapsed_time = timer_elapsed(last_time);
last_time = timer_read();
snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time);
}
const char *read_timelog(void) {
return timelog_str;
}