diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-03-10 22:05:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-03-10 22:05:31 +0000 |
commit | 7dbc6a75678e6e06ec99786eb945d043b64e9721 (patch) | |
tree | 7da13c151526d44c447df2a6c0fe7f53be2846a5 /src | |
parent | da4f9beaee8f1f8f344012b4d9a122462a6c802e (diff) | |
download | ChibiOS-7dbc6a75678e6e06ec99786eb945d043b64e9721.tar.gz ChibiOS-7dbc6a75678e6e06ec99786eb945d043b64e9721.tar.bz2 ChibiOS-7dbc6a75678e6e06ec99786eb945d043b64e9721.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@829 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r-- | src/chvt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chvt.c b/src/chvt.c index 9d4fec138..ce322e35f 100644 --- a/src/chvt.c +++ b/src/chvt.c @@ -102,12 +102,14 @@ void chVTResetI(VirtualTimer *vtp) { * @param[in] end the end of the time window (non inclusive)
* @retval TRUE current time within the specified time window.
* @retval FALSE current time not within the specified time window.
+ * @note When start==end then the function returns always true because the
+ * whole time range is specified.
*/
bool_t chTimeIsWithin(systime_t start, systime_t end) {
systime_t time = chTimeNow();
- return end >= start ? (time >= start) && (time < end) :
- (time >= start) || (time < end);
+ return end > start ? (time >= start) && (time < end) :
+ (time >= start) || (time < end);
}
/** @} */
|