diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-03-19 16:09:41 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-03-19 17:35:46 +0000 |
commit | bd6805a8c18f859a8f467965f2ee780817d8a81e (patch) | |
tree | d228abb380a1acf56ccadce6ea98de2918696631 /src/include/time.h | |
parent | 0b2c7885c74ae680509e07c552e594f3787900f8 (diff) | |
download | ipxe-bd6805a8c18f859a8f467965f2ee780817d8a81e.zip ipxe-bd6805a8c18f859a8f467965f2ee780817d8a81e.tar.gz ipxe-bd6805a8c18f859a8f467965f2ee780817d8a81e.tar.bz2 |
[libc] Add mktime() function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/time.h')
-rw-r--r-- | src/include/time.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/include/time.h b/src/include/time.h index 6ea927c..f33300a 100644 --- a/src/include/time.h +++ b/src/include/time.h @@ -1,22 +1,35 @@ #ifndef _TIME_H #define _TIME_H -typedef unsigned long time_t; +/** @file + * + * Date and time + */ +#include <sys/time.h> + +/** Broken-down time */ struct tm { - int tm_sec; /* seconds */ - int tm_min; /* minutes */ - int tm_hour; /* hours */ - int tm_mday; /* day of the month */ - int tm_mon; /* month */ - int tm_year; /* year */ - int tm_wday; /* day of the week */ - int tm_yday; /* day in the year */ - int tm_isdst; /* daylight saving time */ + /** Seconds [0,60] */ + int tm_sec; + /** Minutes [0,59] */ + int tm_min; + /** Hour [0,23] */ + int tm_hour; + /** Day of month [1,31] */ + int tm_mday; + /** Month of year [0,11] */ + int tm_mon; + /** Years since 1900 */ + int tm_year; + /** Day of week [0,6] (Sunday=0) */ + int tm_wday; + /** Day of year [0,365] */ + int tm_yday; + /** Daylight savings flag */ + int tm_isdst; }; -extern time_t time ( time_t *t ); - extern time_t mktime ( struct tm *tm ); #endif /* _TIME_H */ |