From 70eadd26d747c10e6c985b44cdd14c7df408d873 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 12 Nov 2013 11:19:51 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6468 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/include/nil.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'os') diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h index b6ef8436d..7ba088dac 100644 --- a/os/nil/include/nil.h +++ b/os/nil/include/nil.h @@ -719,6 +719,17 @@ typedef struct { #define chVTGetSystemTimeX() port_timer_get_time() #endif +/** + * @brief Returns the elapsed time since the specified start time. + * + * @param[in] start start time + * @return The elapsed time. + * + * @xclass + */ +#define chVTTimeElapsedSinceX(start) \ + ((systime_t)(chVTGetSystemTimeX() - start)) + /** * @brief Checks if the specified time is within the specified time window. * @note When start==end then the function returns always true because the -- cgit v1.2.3