summaryrefslogtreecommitdiffstats
path: root/src/include/time.h
diff options
context:
space:
mode:
authorMichael Brown2012-03-19 17:09:41 +0100
committerMichael Brown2012-03-19 18:35:46 +0100
commitbd6805a8c18f859a8f467965f2ee780817d8a81e (patch)
treed228abb380a1acf56ccadce6ea98de2918696631 /src/include/time.h
parent[crypto] Use correct constraint for byte-addressable register (diff)
downloadipxe-bd6805a8c18f859a8f467965f2ee780817d8a81e.tar.gz
ipxe-bd6805a8c18f859a8f467965f2ee780817d8a81e.tar.xz
ipxe-bd6805a8c18f859a8f467965f2ee780817d8a81e.zip
[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.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/include/time.h b/src/include/time.h
index 6ea927c3..f33300ab 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 */