1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
| | #ifndef SYS_TIME_H_INCLUDED
#define SYS_TIME_H_INCLUDED
#include_next <sys/time.h>
struct itimerspec
{
struct timespec it_interval; /* timer interval */
struct timespec it_value; /* current value */
};
union sigval
{
int sival_int;
void *sival_ptr;
};
struct sigevent
{
int sigev_notify;
int sigev_signo;
union sigval sigev_value;
void (*sigev_notify_function) (union sigval);
/* Although POSIX requires 'pthread_attr_t *sigev_notify_attributes;',
that might clash with MinGW and Emacs *doesn’t need it. */
};
#define SIGEV_SIGNAL 0
#define TIMER_ABSTIME 1
#ifndef CLOCK_REALTIME
typedef int clockid_t;
# define CLOCK_REALTIME 0
#endif
#ifndef CLOCK_THREAD_CPUTIME_ID
# define CLOCK_THREAD_CPUTIME_ID 106 /* unlikely to clash */
#endif
typedef struct
{
clockid_t clockid;
} timer_t;
int timer_create (clockid_t, struct sigevent *restrict, timer_t *restrict);
int timer_settime (timer_t, int, struct itimerspec const *,
struct itimerspec *restrict);
int timer_getoverrun (timer_t);
#endif /* SYS_TIME_H_INCLUDED */
/* end of sys/time.h */
|