49 lines
1015 B
C
49 lines
1015 B
C
|
|
#ifndef __TIME_H__
|
|
#define __TIME_H__
|
|
|
|
typedef uint64_t time_t;
|
|
typedef uint64_t suseconds_t;
|
|
|
|
struct tm {
|
|
int tm_sec;
|
|
int tm_min;
|
|
int tm_hour;
|
|
int tm_mday;
|
|
int tm_mon;
|
|
int tm_year;
|
|
int tm_wday;
|
|
int tm_yday;
|
|
int tm_isdst;
|
|
};
|
|
|
|
struct timeval
|
|
{
|
|
time_t tv_sec;
|
|
suseconds_t tv_usec;
|
|
};
|
|
|
|
struct timezone {
|
|
int tz_minuteswest;
|
|
int tz_dsttime;
|
|
};
|
|
|
|
time_t time(time_t *t);
|
|
char *asctime_r(const struct tm *tm, char *buf);
|
|
char *asctime(const struct tm *tm);
|
|
char *ctime_r(const time_t *timep, char *buf);
|
|
char *ctime(const time_t *timep);
|
|
struct tm *gmtime(const time_t *timep);
|
|
struct tm *gmtime_r(const time_t *timep, struct tm *result);
|
|
struct tm *localtime(const time_t *timep);
|
|
struct tm *localtime_r(const time_t *timep, struct tm *result);
|
|
time_t mktime(struct tm *tm);
|
|
|
|
int gettimeofday(struct timeval *tv, struct timezone *tz);
|
|
|
|
// XXX: Not implemented
|
|
int settimeofday(const struct timeval *tv, const struct timezone *tz);
|
|
|
|
#endif /* __TIME_H__ */
|
|
|