mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
sched/wdog: Replace periodcial timer with the wd_start_next.
This commit replaced periodical timer with the wd_start_next to improve the timing accuracy. Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
9d1b958524
commit
efe2af643f
@@ -128,7 +128,7 @@ static inline void timer_restart(FAR struct posix_timer_s *timer,
|
||||
*/
|
||||
|
||||
frame = (delay + timer->pt_delay) / timer->pt_delay;
|
||||
timer->pt_overrun = frame - 1;
|
||||
timer->pt_overrun = frame - 1;
|
||||
timer->pt_expected += frame * timer->pt_delay;
|
||||
|
||||
wd_start_abstick(&timer->pt_wdog, timer->pt_expected,
|
||||
|
||||
Reference in New Issue
Block a user