X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Ftimer.h;h=a68ee5b21dd9703735582fdad4c701ea7f10ec69;hb=11bd07ba56015a0ad55fc0cb3b41d0757dcdc03f;hp=83483b9975c4f5a9bc26693a723be828ac2271ae;hpb=1c11ac0ab0636d07db3899b02c5d89e2d0b020bc;p=bertos.git diff --git a/bertos/drv/timer.h b/bertos/drv/timer.h index 83483b99..a68ee5b2 100644 --- a/bertos/drv/timer.h +++ b/bertos/drv/timer.h @@ -100,6 +100,9 @@ STATIC_ASSERT(sizeof(hptime_t) == SIZEOF_HPTIME_T); extern volatile ticks_t _clock; +#define TIMER_AFTER(x, y) ((long)(y) - (long)(x) < 0) +#define TIMER_BEFORE(x, y) TIMER_AFTER(y, x) + /** * \brief Return the system tick counter (expressed in ticks) *