diff options
| author | William Chang <[email protected]> | 2019-07-13 10:18:33 -0700 |
|---|---|---|
| committer | William Chang <[email protected]> | 2019-07-13 10:18:33 -0700 |
| commit | 71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (patch) | |
| tree | 3bb3e5e496621535611e087720aa5c4d7a533e5e /users/xulkal/timer_utils.c | |
| parent | 86ad4988fe7ff64916127509d84f44c56fa097aa (diff) | |
| parent | da1f05fbc19477c05c0c01bb07fabfaf1ece9d54 (diff) | |
| download | qmk_firmware-71493b2f9bbd5f3d18373c518fa14ccafcbf48fc.tar.gz qmk_firmware-71493b2f9bbd5f3d18373c518fa14ccafcbf48fc.zip | |
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Diffstat (limited to 'users/xulkal/timer_utils.c')
| -rw-r--r-- | users/xulkal/timer_utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/users/xulkal/timer_utils.c b/users/xulkal/timer_utils.c new file mode 100644 index 0000000000..5f5d9a1ebf --- /dev/null +++ b/users/xulkal/timer_utils.c @@ -0,0 +1,12 @@ +#include "timer_utils.h" + +bool timer_expired(uint16_t last) +{ + return timer_read() - last < 0x8000; +} + +bool timer_expired32(uint32_t last) +{ + return timer_read32() - last < 0x80000000; +} + |
