766ac728b17a070842f7fb3273624c6c46ec76b8
[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 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
21
22 #define ITIMER_REAL    0
23 #define ITIMER_VIRTUAL 1
24 #define ITIMER_PROF    2
25
26 struct itimerval
27 {
28         struct timeval it_interval;
29         struct timeval it_value;
30 };
31
32 int getitimer (int, struct itimerval *);
33 int setitimer (int, const struct itimerval *, struct itimerval *);
34 int utimes (const char *, const struct timeval [2]);
35
36 #endif
37
38 #ifdef _GNU_SOURCE
39 int settimeofday (const struct timeval *, void *);
40 int adjtime (const struct timeval *, struct timeval *);
41 struct timezone {
42         int tz_minuteswest;
43         int tz_dsttime;
44 };
45 #endif
46
47 #ifdef __cplusplus
48 }
49 #endif
50 #endif