mirror of
https://github.com/apache/nuttx.git
synced 2026-09-23 07:14:28 +08:00
wdog: wd_gettime() return 0 when wdog has already expired
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
@@ -75,7 +75,7 @@ sclock_t wd_gettime(FAR struct wdog_s *wdog)
|
||||
{
|
||||
delay -= wd_elapse();
|
||||
leave_critical_section(flags);
|
||||
return delay;
|
||||
return delay < 0 ? 0 : delay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user