aboutsummaryrefslogtreecommitdiffstats
path: root/os/nil
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-11-12 11:19:51 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-11-12 11:19:51 +0000
commit70eadd26d747c10e6c985b44cdd14c7df408d873 (patch)
treec1239b7cd8e0ca9e14794dbece77919f0d694808 /os/nil
parent5a70ffdbf38323a58d2e1fa6289ad7caea1fe12a (diff)
downloadChibiOS-70eadd26d747c10e6c985b44cdd14c7df408d873.tar.gz
ChibiOS-70eadd26d747c10e6c985b44cdd14c7df408d873.tar.bz2
ChibiOS-70eadd26d747c10e6c985b44cdd14c7df408d873.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6468 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/nil')
-rw-r--r--os/nil/include/nil.h11
1 files changed, 11 insertions, 0 deletions
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
@@ -720,6 +720,17 @@ typedef struct {
#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
* whole time range is specified.