5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: ANSI-C header file time.h
11 #include <sys/_types.h>
12 #include <sys/cdefs.h>
13 #include <sys/arosc.h>
15 #ifndef __AROS_TIME_T_DECLARED
16 #define __AROS_TIME_T_DECLARED
17 typedef __time_t
time_t;
20 #ifndef __AROS_CLOCK_T_DECLARED
21 #define __AROS_CLOCK_T_DECLARED
22 typedef __clock_t
clock_t;
29 /* XXX: This is supposed to be 1000000 on SUSv2 platforms apparently */
30 #define CLOCKS_PER_SEC 50
47 #if !defined(_ANSI_SOURCE) && defined(_P1003_1B_VISIBLE)
49 #ifndef __AROS_TIMER_T_DECLARED
50 #define __AROS_TIMER_T_DECLARED
51 typedef __timer_t timer_t
;
54 #ifndef __AROS_CLOCKID_T_DECLARED
55 #define __AROS_CLOCKID_T_DECLARED
56 typedef __clockid_t clockid_t
;
61 time_t tv_sec
; /* seconds */
62 long tv_nsec
; /* nanoseconds */
67 struct timespec it_interval
; /* timer period */
68 struct timespec it_value
; /* timer expiration */
71 #define CLOCK_REALTIME 0
72 #define TIMER_ABSTIME 1
74 /* time.h shouldn't include signal.h */
77 #endif /* !_ANSI_SOURCE && _P1003_1B_VISIBLE */
80 #define __daylight (__get_arosc_userdata()->acud_daylight)
81 #define __timezone (__get_arosc_userdata()->acud_timezone)
85 #define __tzname (__get_arosc_userdata()->acud_tzname)
89 char *asctime(const struct tm
*);
91 char *ctime(const time_t *);
92 double difftime(time_t, time_t);
93 struct tm
*gmtime(const time_t *);
94 struct tm
*localtime(const time_t *);
95 time_t mktime(struct tm
*);
96 size_t strftime(char *, size_t, const char *, const struct tm
*);
97 time_t time(time_t *);
99 #if !defined(_ANSI_SOURCE)
100 /* NOTIMPL void tzset(void); */
103 #if __POSIX_VISIBLE >= 199506
104 char *asctime_r(const struct tm
*, char *);
105 char *ctime_r(const time_t *, char *);
106 struct tm
*gmtime_r(const time_t *, struct tm
*);
107 struct tm
*localtime_r(const time_t *, struct tm
*);
111 /* NOTIMPL struct tm *getdate(const char *); */
112 char *strptime(const char *, const char *, struct tm
*);
115 #if __POSIX_VISIBLE >= 199309
116 /* NOTIMPL int clock_getres(clockid_t, struct timespec *); */
117 /* NOTIMPL int clock_gettime(clockid_t, struct timespec *); */
118 /* NOTIMPL int clock_settime(clockid_t, const struct timespec *); */
119 /* NOTIMPL int nanosleep(const struct timespec *, struct timespec *); */
121 /* NOTIMPL int timer_create(clockid_t, struct sigevent *, timer_t *); */
122 /* NOTIMPL int timer_delete(timer_t); */
123 /* NOTIMPL int timer_gettime(timer_t, struct itimerspec *); */
124 /* NOTIMPL int timer_getoverrun(timer_t); */
125 /* NOTIMPL int timer_settime(timer_t, int, const struct itimerspec *,
126 struct itimerspec *); */
131 #endif /* _TIME_H_ */