diff options
-rw-r--r-- | Carpet/CarpetLib/src/cycle.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/cycle.h b/Carpet/CarpetLib/src/cycle.h index e6367c3ea..5e0d332e2 100644 --- a/Carpet/CarpetLib/src/cycle.h +++ b/Carpet/CarpetLib/src/cycle.h @@ -511,3 +511,21 @@ INLINE_ELAPSED(inline) #define HAVE_TICK_COUNTER #endif #endif /* HAVE_MIPS_ZBUS_TIMER */ + +/*----------------------------------------------------------------*/ +/* Fallback -- this must be the last entry in this file */ +#if !defined(HAVE_TICK_COUNTER) + +typedef double ticks; + +static inline ticks getticks(void) +{ + static ticks counter = 0; + + return ++ counter; +} + +INLINE_ELAPSED(inline) + +#define HAVE_TICK_COUNTER +#endif |