logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

timer.c (479B)


  1. // Copyright 2023 Sergey Vlasov (@sigprof)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "timer.h"
  4. // Generate out-of-line copies for inline functions defined in timer.h.
  5. extern inline fast_timer_t timer_read_fast(void);
  6. extern inline fast_timer_t timer_elapsed_fast(fast_timer_t last);
  7. uint16_t timer_elapsed(uint16_t last) {
  8. return TIMER_DIFF_16(timer_read(), last);
  9. }
  10. uint32_t timer_elapsed32(uint32_t last) {
  11. return TIMER_DIFF_32(timer_read32(), last);
  12. }