diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-13 12:35:40 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-10-13 12:35:40 +0000 |
commit | cb725828056b9564ab5d723bd0738375a83c077c (patch) | |
tree | 1db3326fe3ea3b0103830c5dfdf16518aec9e404 /os/rt/include/chtime.h | |
parent | 882e9afb959e5ecc8800a79bb3cf3dabf1a7ccc6 (diff) | |
download | ChibiOS-cb725828056b9564ab5d723bd0738375a83c077c.tar.gz ChibiOS-cb725828056b9564ab5d723bd0738375a83c077c.tar.bz2 ChibiOS-cb725828056b9564ab5d723bd0738375a83c077c.zip |
Fixed and optimizations, NOW it seems to work for intervals larger than system time.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10818 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include/chtime.h')
-rw-r--r-- | os/rt/include/chtime.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/rt/include/chtime.h b/os/rt/include/chtime.h index e2e3402ef..701dfb4d5 100644 --- a/os/rt/include/chtime.h +++ b/os/rt/include/chtime.h @@ -488,7 +488,7 @@ static inline systime_t chTimeAddX(systime_t systime, */
static inline sysinterval_t chTimeDiffX(systime_t start, systime_t end) {
- return (sysinterval_t)(end - start);
+ return (sysinterval_t)((systime_t)(end - start));
}
@@ -509,7 +509,7 @@ static inline bool chTimeIsInRangeX(systime_t time, systime_t start,
systime_t end) {
- return (bool)((systime_t)(time - start) < (systime_t)(end - start));
+ return (bool)((time - start) < (end - start));
}
/** @} */
|