diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2009-10-18 15:50:30 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2009-10-18 15:50:30 +0000 |
commit | d24d885aa42b5087d89f12dabad13895051da4e2 (patch) | |
tree | 61584fe54660aab9a57bcb67c5a65cb888f4a38b /firmware/common | |
parent | 1c64a4d3e0a4ae2f4eb537f00c7dc4372ca5df88 (diff) |
Use wrap-safe TIME_BEFORE/TIME_AFTER macros to compare times with current_time, instead of comparing them directly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23246 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
-rw-r--r-- | firmware/common/timefuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index eef804d302..e423e016fd 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -64,7 +64,7 @@ struct tm *get_time(void) static long timeout = 0; /* Don't read the RTC more than once per second */ - if (current_tick > timeout) + if (TIME_AFTER(current_tick, timeout)) { /* Once per second, 1/10th of a second off */ timeout = HZ * (current_tick / HZ + 1) + HZ / 5; |