summaryrefslogtreecommitdiff
path: root/firmware/common/timefuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/common/timefuncs.c')
-rw-r--r--firmware/common/timefuncs.c2
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;