git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@829 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
da4f9beaee
commit
7dbc6a7567
|
@ -75,6 +75,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
|
|||
*** 1.1.2unstable ***
|
||||
- FIX: Fixed priority inheritance problem with condvars (bug 2674756) and
|
||||
added a specific test case to the test suite (backported in stable branch).
|
||||
- FIX: Fixed a problem in time ranges (bug 2680425)(backported in stable
|
||||
branch).
|
||||
- FIX: Fixed a wrong parameter check in chVTSetI() (bug 2679155).
|
||||
- FIX: Build error with options CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED
|
||||
(bug 2678928).
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
|
Loading…
Reference in New Issue