12 #define NULL ((void*)0)
17 #define __NEED_struct_timespec
18 #define __NEED_clock_t
19 #define __NEED_clockid_t
20 #define __NEED_timer_t
24 #include <bits/alltypes.h>
39 const char *__tm_zone;
44 struct timespec it_interval;
45 struct timespec it_value;
48 #define CLOCKS_PER_SEC 1000000UL
50 #define CLOCK_REALTIME 0
51 #define CLOCK_MONOTONIC 1
52 #define CLOCK_PROCESS_CPUTIME_ID 2
53 #define CLOCK_THREAD_CPUTIME_ID 3
55 #define TIMER_ABSTIME 1
60 time_t time (time_t *);
61 double difftime (time_t, time_t);
62 time_t mktime (struct tm *);
63 size_t strftime (char *, size_t, const char *, const struct tm *);
64 char *strptime (const char *, const char *, struct tm *);
66 struct tm *gmtime (const time_t *);
67 struct tm *gmtime_r (const time_t *, struct tm *);
68 struct tm *localtime (const time_t *);
69 struct tm *localtime_r (const time_t *, struct tm *);
71 char *asctime (const struct tm *);
72 char *asctime_r (const struct tm *, char *);
73 char *ctime (const time_t *);
74 char *ctime_r (const time_t *, char *);
79 extern char *tzname[2];
85 int nanosleep (const struct timespec *, struct timespec *);
88 int clock_getres (clockid_t, struct timespec *);
89 int clock_gettime (clockid_t, struct timespec *);
90 int clock_settime (clockid_t, const struct timespec *);
92 int clock_nanosleep (clockid_t, int, const struct timespec *, struct timespec *);
93 int clock_getcpuclockid (pid_t, clockid_t *);
97 int timer_create (clockid_t, struct sigevent *, timer_t *);
98 int timer_delete (timer_t);
100 int timer_settime (timer_t, int, const struct itimerspec *, struct itimerspec *);
101 int timer_gettime (timer_t, struct itimerspec *);
102 int timer_getoverrun (timer_t);
105 extern int getdate_err;
106 extern struct tm *getdate (const char *);