kern
diff src/klibc/time.h @ 36:e70b1ab9613e
- added cmos rtc code
- added time/date functions in klibc
- implemented an iowait macro with output to 0x80
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 10 Jun 2011 05:33:38 +0300 |
parents | |
children | 2c401f69128e |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/klibc/time.h Fri Jun 10 05:33:38 2011 +0300 1.3 @@ -0,0 +1,25 @@ 1.4 +#ifndef _TIME_H_ 1.5 +#define _TIME_H_ 1.6 + 1.7 +typedef long time_t; 1.8 + 1.9 +struct tm { 1.10 + int tm_sec; 1.11 + int tm_min; 1.12 + int tm_hour; 1.13 + int tm_mday; 1.14 + int tm_mon; 1.15 + int tm_year; 1.16 + int tm_wday; 1.17 + int tm_yday; 1.18 + int tm_isdst; 1.19 +}; 1.20 + 1.21 +char *asctime(struct tm *tm); 1.22 +time_t mktime(struct tm *tm); 1.23 + 1.24 +/* non-standard helpers */ 1.25 +int day_of_year(int year, int mon, int day); 1.26 + 1.27 + 1.28 +#endif /* _TIME_H_ */