ea39f95f32d32fc009e48c6424090ca77280088c
[m6w6/ext-psi] / m4 / posix / time.m4
1 PSI_CHECK_TIME() {
2 PSI_CONST(CLOCKS_PER_SEC, int)
3 PSI_CONST(CLOCK_MONOTONIC, int)
4 PSI_CONST(CLOCK_PROCESS_CPUTIME_ID, int)
5 PSI_CONST(CLOCK_REALTIME, int)
6 PSI_CONST(CLOCK_THREAD_CPUTIME_ID, int)
7 PSI_CONST(TIMER_ABSTIME, int)
8
9 PSI_STRUCT(struct tm, [
10 int tm_sec,
11 int tm_min,
12 int tm_hour,
13 int tm_mday,
14 int tm_mon,
15 int tm_year,
16 int tm_wday,
17 int tm_yday,
18 int tm_isdst]
19 )
20 PSI_STRUCT(struct timespec, [
21 time_t tv_sec,
22 long tv_nsec]
23 )
24 PSI_STRUCT(struct itimerspec, [
25 struct timespec it_interval,
26 struct timespec it_value]
27 )
28
29 PSI_DECL(char *asctime, [(struct tm *tm)])
30 PSI_DECL(char *asctime_r, [(struct tm *tm, char *buf)])
31 PSI_DECL(clock_t clock, [()])
32 PSI_DECL(int clock_getcpuclockid, [(pid_t pid, clockid_t *clock_id)], [], [-lrt])
33 PSI_DECL(int clock_getres, [(clockid_t clk_id, struct timespec *res)], [], [-lrt])
34 PSI_DECL(int clock_gettime, [(clockid_t clk_id, struct timespec *tp)], [], [-lrt])
35 PSI_DECL(int clock_nanosleep, [(clockid_t clk_id, int flags, struct timespec *rqtp, struct timespec *rmtp)], [], [-lrt])
36 PSI_DECL(int clock_settime, [(clockid_t clk_id, const struct timespec *tp)], [], [-lrt])
37 PSI_DECL(char *ctime, [(time_t *t)])
38 PSI_DECL(char *ctime_r, [(time_t *t, char *buf)])
39 PSI_DECL(double difftime, [(time_t time1, time_t time0)])
40 PSI_DECL(struct tm *getdate, [(char *string)])
41 PSI_DECL(struct tm *gmtime, [(time_t *t)])
42 PSI_DECL(struct tm *gmtime_r, [(time_t *t, struct tm *buf)])
43 PSI_DECL(struct tm *localtime, [(time_t *t)])
44 PSI_DECL(struct tm *localtime_r, [(time_t *t, struct tm *buf)])
45 PSI_DECL(time_t mktime, [(struct tm *tm)])
46 PSI_DECL(int nanosleep, [(struct timespec *rqts, struct timespec *rmts)])
47 PSI_DECL(size_t strftime, [(char *s, size_t max, char *fmt, struct tm *tm)])
48 PSI_DECL(size_t strftime_l, [(char *s, size_t max, char *fmt, struct tm *tm, locale_t l)])
49 PSI_DECL(char *strptime, [(char *s, char *fmt, struct tm *tm)])
50 PSI_DECL(time_t time, [(time_t *t)])
51 PSI_DECL(int timer_create, [(clockid_t clk_id, struct sigevent *se, timer_t *t)], [], [-lrt])
52 PSI_DECL(int timer_delete, [(timer_t t)], [], [-lrt])
53 PSI_DECL(int timer_getoverrun, [(timer_t t)], [], [-lrt])
54 PSI_DECL(int timer_gettime, [(timer_t t, struct itimerspec *ts)], [], [-lrt])
55 PSI_DECL(int timer_settime, [(timer_t t, int flags, struct itimerspec *value, struct itimerspec *ovalue)], [], [-lrt])
56 PSI_DECL(void tzset, [()])
57
58 PSI_MACRO(int getdate_err)
59 PSI_EXTVAR(int daylight)
60 PSI_EXTVAR(long timezone)
61 PSI_EXTVAR(char *tzname@<:@2@:>@)
62 }