kern

diff src/klibc/time.h @ 41:928b0ebfff4d

merged the timer/rtc/etc from the misc branch
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 14 Jun 2011 01:19:07 +0300
parents e70b1ab9613e
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/klibc/time.h	Tue Jun 14 01:19:07 2011 +0300
     1.3 @@ -0,0 +1,30 @@
     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 +time_t time(time_t *tp);
    1.22 +char *asctime(struct tm *tm);
    1.23 +char *asctime_r(struct tm *tm, char *buf);
    1.24 +
    1.25 +time_t mktime(struct tm *tm);
    1.26 +struct tm *gmtime(time_t *tp);
    1.27 +struct tm *gmtime_r(time_t *tp, struct tm *tm);
    1.28 +
    1.29 +/* non-standard helpers */
    1.30 +int day_of_year(int year, int mon, int day);
    1.31 +
    1.32 +
    1.33 +#endif	/* _TIME_H_ */