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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index 19033a504e..6671dc0739 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -43,12 +43,11 @@ bool valid_time(const struct tm *tm)
43 return true; 43 return true;
44} 44}
45 45
46static int last_tick = 0;
47
48struct tm *get_time(void) 46struct tm *get_time(void)
49{ 47{
50#ifndef SIMULATOR 48#ifndef SIMULATOR
51#ifdef CONFIG_RTC 49#ifdef CONFIG_RTC
50 static long last_tick = 0;
52 51
53 /* Don't read the RTC more than 4 times per second */ 52 /* Don't read the RTC more than 4 times per second */
54 if (last_tick + HZ/4 < current_tick) { 53 if (last_tick + HZ/4 < current_tick) {