extensive header cleanup for standards conformance & correctness
[musl] / include / sys / time.h
1 #ifndef _SYS_TIME_H
2 #define _SYS_TIME_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 /* All symbols from select.h except pselect are required anyway... */
8 #include <sys/select.h>
9
10 #define __NEED_time_t
11 #define __NEED_suseconds_t
12 #define __NEED_struct_timeval
13
14 #include <bits/alltypes.h>
15
16
17
18 int gettimeofday (struct timeval *, void *);
19
20 /* extensions */
21 int settimeofday (const struct timeval *, void *);
22 int adjtime (const struct timeval *, struct timeval *);
23
24
25 #define ITIMER_REAL    0
26 #define ITIMER_VIRTUAL 1
27 #define ITIMER_PROF    2
28
29 struct itimerval
30 {
31         struct timeval it_interval;
32         struct timeval it_value;
33 };
34
35 int getitimer (int, struct itimerval *);
36 int setitimer (int, const struct itimerval *, struct itimerval *);
37 int utimes (const char *, const struct timeval [2]);
38
39 #ifdef _GNU_SOURCE
40 struct timezone {
41         int tz_minuteswest;
42         int tz_dsttime;
43 };
44 #endif
45
46 #ifdef __cplusplus
47 }
48 #endif
49 #endif