diff options
Diffstat (limited to 'os/rt/include/chvt.h')
-rw-r--r-- | os/rt/include/chvt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h index 70c3182e6..f1bb4d9f2 100644 --- a/os/rt/include/chvt.h +++ b/os/rt/include/chvt.h @@ -450,7 +450,7 @@ static inline void chVTDoTickI(void) { ch.vtlist.next->delta -= nowdelta;
/* Recalculating the next alarm time.*/
- delta = chTimeDiffX(now, chTimeAddX(ch.vtlist.lasttime, vtp->delta));
+ delta = vtp->delta - chTimeDiffX(ch.vtlist.lasttime, now);
if (delta < (sysinterval_t)CH_CFG_ST_TIMEDELTA) {
delta = (sysinterval_t)CH_CFG_ST_TIMEDELTA;
}
|