aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/src/chthreads.c
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-10-12 12:25:48 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-10-12 12:25:48 +0000
commitd8b32d7f63c8453135249734f8b542856947e83a (patch)
tree0f9ba68c14d6260f9c67c91c7d2cbd0ce5453230 /os/rt/src/chthreads.c
parent286deccd1280b0d66ccc6d9b2617719582607f0d (diff)
downloadChibiOS-d8b32d7f63c8453135249734f8b542856947e83a.tar.gz
ChibiOS-d8b32d7f63c8453135249734f8b542856947e83a.tar.bz2
ChibiOS-d8b32d7f63c8453135249734f8b542856947e83a.zip
Rework of virtual timers in RT5, preparation.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/rt5_dev_point1@10813 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/src/chthreads.c')
-rw-r--r--os/rt/src/chthreads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c
index b462df09f..49abadb2d 100644
--- a/os/rt/src/chthreads.c
+++ b/os/rt/src/chthreads.c
@@ -670,7 +670,7 @@ void chThdSleepUntil(systime_t time) {
sysinterval_t interval;
chSysLock();
- interval = chTimeSubtractX(time, chVTGetSystemTimeX());
+ interval = chTimeDiffX(time, chVTGetSystemTimeX());
if (interval > (sysinterval_t)0) {
chThdSleepS(interval);
}
@@ -697,7 +697,7 @@ systime_t chThdSleepUntilWindowed(systime_t prev, systime_t next) {
chSysLock();
time = chVTGetSystemTimeX();
if (chTimeIsInRangeX(time, prev, next)) {
- chThdSleepS(chTimeSubtractX(next, time));
+ chThdSleepS(chTimeDiffX(next, time));
}
chSysUnlock();