move TIMER_AFTER() and TIMER_BEFORE() macros in drv/timer.h
[bertos.git] / bertos / drv / timer.h
index 83483b9975c4f5a9bc26693a723be828ac2271ae..a68ee5b21dd9703735582fdad4c701ea7f10ec69 100644 (file)
@@ -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)
  *