diff options
Diffstat (limited to 'include/rtc.h')
-rw-r--r-- | include/rtc.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/rtc.h b/include/rtc.h index 4b7ce6108c..b1a4bf05ec 100644 --- a/include/rtc.h +++ b/include/rtc.h @@ -45,9 +45,6 @@ int rtc_get (struct rtc_time *); int rtc_set (struct rtc_time *); void rtc_reset (void); -unsigned long mktime (unsigned int, unsigned int, unsigned int, - unsigned int, unsigned int, unsigned int); - /** * rtc_read8() - Read an 8-bit register * @@ -110,4 +107,17 @@ int rtc_calc_weekday(struct rtc_time *time); */ int rtc_to_tm(int time_t, struct rtc_time *time); +/** + * rtc_mktime() - Convert a broken-out time into a time_t value + * + * The following fields need to be valid for this function to work: + * tm_sec, tm_min, tm_hour, tm_mday, tm_mon, tm_year + * + * Note that tm_wday and tm_yday are ignored. + * + * @time: Broken-out time to convert + * @return corresponding time_t value, seconds since 1970-01-01 00:00:00 + */ +unsigned long rtc_mktime(const struct rtc_time *time); + #endif /* _RTC_H_ */ |