diff options
author | Chris Packham <judge.packham@gmail.com> | 2020-02-24 13:20:33 +1300 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2020-03-16 11:25:12 +0100 |
commit | 6d8eae9ab7d17ca3ce84c5e6e29bd452936ad407 (patch) | |
tree | 0510515378f74c4c4687819e1babfd531fdb5254 /tools | |
parent | ed666fb12910f46cff73a3869058ea59aef4261b (diff) |
watchdog: Handle timer wrap around
On some platforms/architectures the value from get_timer() can wrap.
This is particularly problematic when long-running code needs to measure
a time difference as is the case with watchdog_reset() which tries to
avoid tickling the watchdog too frequently.
Use time_after() from time.h instead of a plain > comparison to avoid
any issues with the time wrapping on a system that has been sitting in
u-boot for a long time.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions