diff options
author | Brandon Low <lostlogic@rockbox.org> | 2006-03-07 05:26:18 +0000 |
---|---|---|
committer | Brandon Low <lostlogic@rockbox.org> | 2006-03-07 05:26:18 +0000 |
commit | 8348cebe9ab2ed5a6f52c01508c831d018f149ba (patch) | |
tree | 6ccb5d8cf03fa8537928b4cb8eda768a66c4905d /firmware/common/timefuncs.c | |
parent | a4b45ee1311f3848e2f16d88ca9f67e49f3e41c6 (diff) |
Fix red builds (with frustration)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8941 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common/timefuncs.c')
-rw-r--r-- | firmware/common/timefuncs.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index a924ed496a..275fc6c782 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c @@ -46,11 +46,11 @@ bool valid_time(const struct tm *tm) struct tm *get_time(void) { #ifndef SIMULATOR +#ifdef CONFIG_RTC static long last_tick = 0; /* Don't read the RTC more than 4 times per second */ if (last_tick + HZ < current_tick) { -#ifdef CONFIG_RTC char rtcbuf[7]; last_tick = HZ * (current_tick / HZ); rtc_read_datetime(rtcbuf); @@ -65,18 +65,18 @@ struct tm *get_time(void) tm.tm_yday = 0; /* Not implemented for now */ tm.tm_isdst = -1; /* Not implemented for now */ + } #else - tm.tm_sec = 0; - tm.tm_min = 0; - tm.tm_hour = 0; - tm.tm_mday = 1; - tm.tm_mon = 0; - tm.tm_year = 70; - tm.tm_wday = 1; - tm.tm_yday = 0; /* Not implemented for now */ - tm.tm_isdst = -1; /* Not implemented for now */ + tm.tm_sec = 0; + tm.tm_min = 0; + tm.tm_hour = 0; + tm.tm_mday = 1; + tm.tm_mon = 0; + tm.tm_year = 70; + tm.tm_wday = 1; + tm.tm_yday = 0; /* Not implemented for now */ + tm.tm_isdst = -1; /* Not implemented for now */ #endif - } return &tm; #else time_t now = time(NULL); |