X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Finclude%2Ftimer.h;h=f15e6fbdca33ef10ba596b96d8aad86383a82cf9;hb=ed51f317816e1fe0dc13ef356d9a9a07056d06b0;hp=43d6f2ece5afbf8a79360caf28a9fd9a42c63ca6;hpb=e6666bf3bbc1ed933042cc20ee89637ba8dc648b;p=carl9170fw.git diff --git a/carlfw/include/timer.h b/carlfw/include/timer.h index 43d6f2e..f15e6fb 100644 --- a/carlfw/include/timer.h +++ b/carlfw/include/timer.h @@ -49,6 +49,11 @@ static inline __inline bool is_after_msecs(const uint32_t t0, const uint32_t mse return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_usec); } +static inline __inline bool is_after_usecs(const uint32_t t0, const uint32_t usecs) +{ + return ((get_clock_counter() - t0)) > (usecs * fw.ticks_per_usec); +} + /* * Note: Be careful with [u]delay. They won't service the * hardware watchdog timer. It might trigger if you