1macro-constant NULL == 0
2macro CLOCKS_PER_SEC {clock_t}
3
4#ifdef ISO11
5macro-int-constant TIME_UTC > 0
6#endif
7
8#if !defined ISO && !defined ISO99 && !defined XPG4 && !defined XPG42
9type {struct timespec}
10
11element {struct timespec} time_t tv_sec
12// Bug 16437: tv_nsec has wrong type.
13xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
14#endif
15
16type size_t
17type clock_t
18type time_t
19
20type {struct tm}
21
22element {struct tm} int tm_sec
23element {struct tm} int tm_min
24element {struct tm} int tm_hour
25element {struct tm} int tm_mday
26element {struct tm} int tm_mon
27element {struct tm} int tm_year
28element {struct tm} int tm_wday
29element {struct tm} int tm_yday
30element {struct tm} int tm_isdst
31
32function clock_t clock (void)
33function double difftime (time_t, time_t)
34function time_t mktime (struct tm*)
35function time_t time (time_t*)
36function {char*} asctime (const struct tm*)
37function {char*} ctime (const time_t*)
38function {struct tm*} gmtime (const time_t*)
39function {struct tm*} localtime (const time_t*)
40function size_t strftime (char*, size_t, const char*, const struct tm*)
41#if defined ISO11
42function int timespec_get (struct timespec *, int)
43#endif
44
45#if !defined ISO && !defined ISO99 && !defined ISO11
46# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
47symbol CLK_TCK
48# endif
49# if !defined XPG4 && !defined XPG42
50#  if !defined POSIX && !defined UNIX98
51constant CLOCK_PROCESS_CPUTIME_ID
52constant CLOCK_THREAD_CPUTIME_ID
53#  endif
54
55type {struct itimerspec}
56
57element {struct itimerspec} {struct timespec} it_interval
58element {struct itimerspec} {struct timespec} it_value
59
60constant CLOCK_REALTIME
61constant TIMER_ABSTIME
62#  if !defined POSIX && !defined UNIX98
63constant CLOCK_MONOTONIC
64#  endif
65
66type clockid_t
67type timer_t
68# endif
69
70# if defined XOPEN2K8 || defined POSIX2008
71type pid_t
72type locale_t
73tag {struct sigevent}
74# endif
75
76# if !defined XPG4 && !defined POSIX && !defined POSIX2008
77variable int getdate_err
78# endif
79
80function {char*} asctime_r (const struct tm*, char*)
81#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
82function int clock_getcpuclockid (pid_t, clockid_t*)
83#endif
84#if !defined XPG4 && !defined XPG42
85function int clock_getres (clockid_t, struct timespec*)
86function int clock_gettime (clockid_t, struct timespec*)
87#endif
88#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
89function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*)
90#endif
91#if !defined XPG4 && !defined XPG42
92function int clock_settime (clockid_t, const struct timespec*)
93#endif
94function {char*} ctime_r (const time_t*, char*)
95# if !defined XPG4 && !defined POSIX && !defined POSIX2008
96function {struct tm*} getdate (const char*)
97# endif
98function {struct tm*} gmtime_r (const time_t*, struct tm*)
99function {struct tm*} localtime_r (const time_t*, struct tm*)
100# if !defined XPG4 && !defined XPG42
101function int nanosleep (const struct timespec*, struct timespec*)
102# endif
103# if defined XOPEN2K8 || defined POSIX2008
104function size_t strftime_l (char*, size_t, const char*, const struct tm*, locale_t)
105# endif
106# if !defined POSIX && !defined POSIX2008
107function {char*} strptime (const char*, const char*, struct tm*)
108# endif
109# if !defined XPG4 && !defined XPG42
110function int timer_create (clockid_t, struct sigevent*, timer_t*)
111function int timer_delete (timer_t)
112function int timer_gettime (timer_t, struct itimerspec*)
113function int timer_getoverrun (timer_t)
114function int timer_settime (timer_t, int, const struct itimerspec*, struct itimerspec*)
115# endif
116function void tzset (void)
117
118# if !defined POSIX && !defined POSIX2008
119variable int daylight
120variable {long int} timezone
121# endif
122variable {char*} tzname [2]
123
124# ifndef POSIX
125allow tm_*
126# endif
127allow clock_*
128allow timer_*
129allow it_*
130allow tv_*
131allow CLOCK_*
132allow TIMER_*
133allow *_t
134allow sigevent
135#endif
136