summaryrefslogtreecommitdiffstats
path: root/users/xulkal/timer_utils.c
blob: 5f5d9a1ebfd7108540ff54e3a95fcba06d330165 (plain)
1
2
3
4
5
6
7
8
9
10
11
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;
}