12 #define NULL ((void*)0)
18 #define __NEED_clock_t
20 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
21 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
22 #define __NEED_struct_timespec
23 #define __NEED_clockid_t
24 #define __NEED_timer_t
28 #include <bits/alltypes.h>
42 const char *__tm_zone;
46 time_t time (time_t *);
47 double difftime (time_t, time_t);
48 time_t mktime (struct tm *);
49 size_t strftime (char *, size_t, const char *, const struct tm *);
50 struct tm *gmtime (const time_t *);
51 struct tm *localtime (const time_t *);
52 char *asctime (const struct tm *);
53 char *ctime (const time_t *);
55 #define CLOCKS_PER_SEC 1000000UL
58 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
59 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
61 struct tm *gmtime_r (const time_t *, struct tm *);
62 struct tm *localtime_r (const time_t *, struct tm *);
63 char *asctime_r (const struct tm *, char *);
64 char *ctime_r (const time_t *, char *);
70 struct timespec it_interval;
71 struct timespec it_value;
74 #define CLOCK_REALTIME 0
75 #define CLOCK_MONOTONIC 1
76 #define CLOCK_PROCESS_CPUTIME_ID 2
77 #define CLOCK_THREAD_CPUTIME_ID 3
79 #define TIMER_ABSTIME 1
81 int nanosleep (const struct timespec *, struct timespec *);
82 int clock_getres (clockid_t, struct timespec *);
83 int clock_gettime (clockid_t, struct timespec *);
84 int clock_settime (clockid_t, const struct timespec *);
85 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *);
86 int clock_getcpuclockid (pid_t, clockid_t *);
90 int timer_create (clockid_t, struct sigevent *, timer_t *);
91 int timer_delete (timer_t);
92 int timer_settime (timer_t, int, const struct itimerspec *, struct itimerspec *);
93 int timer_gettime (timer_t, struct itimerspec *);
94 int timer_getoverrun (timer_t);
99 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
100 char *strptime (const char *, const char *, struct tm *);
102 extern long timezone;
103 extern char *tzname[2];
104 extern int getdate_err;
105 extern struct tm *getdate (const char *);