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
| | #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 */
};
typedef struct pthread_attr_t *pthread_attr_t;
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);
pthread_attr_t *sigev_notify_attributes;
};
#define SIGEV_SIGNAL 0
#define TIMER_ABSTIME 1
typedef enum { CLOCK_REALTIME, CLOCK_THREAD_CPUTIME_ID } clockid_t;
#define CLOCK_REALTIME CLOCK_REALTIME
#define CLOCK_THREAD_CPUTIME_ID CLOCK_THREAD_CPUTIME_ID
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 */
|