19 #ifndef _XENO_POSIX_TIME_H
20 #define _XENO_POSIX_TIME_H
22 #if defined(__KERNEL__) || defined(__XENO_SIM__)
24 #include <nucleus/xenomai.h>
27 #include <linux/time.h>
28 #define DELAYTIMER_MAX UINT_MAX
32 #include <posix_overrides.h>
36 #define TIMER_ABSTIME 1
41 #pragma GCC system_header
43 #include_next <time.h>
46 #include_next <time.h>
50 #ifndef CLOCK_MONOTONIC
52 #define CLOCK_MONOTONIC 1
60 #define CLOCK_HOST_REALTIME 42
62 #if defined(__KERNEL__) || defined(__XENO_SIM__)
73 struct timespec *res);
79 const struct timespec *tp);
83 const struct timespec *rqtp,
84 struct timespec *rmtp);
86 int nanosleep(
const struct timespec *rqtp,
87 struct timespec *rmtp);
90 const struct sigevent *__restrict__ evp,
91 timer_t *__restrict__ timerid);
97 const struct itimerspec *__restrict__ value,
98 struct itimerspec *__restrict__ ovalue);
100 int timer_gettime(timer_t timerid,
struct itimerspec *value);
114 int __real_clock_getres(clockid_t clock_id,
115 struct timespec *tp);
117 int __real_clock_gettime(clockid_t clock_id,
118 struct timespec *tp);
120 int __real_clock_settime(clockid_t clock_id,
121 const struct timespec *tp);
123 int __real_clock_nanosleep(clockid_t clock_id,
125 const struct timespec *rqtp,
126 struct timespec *rmtp);
128 int __real_nanosleep(
const struct timespec *rqtp,
129 struct timespec *rmtp);
131 int __real_timer_create (clockid_t clockid,
132 struct sigevent *evp,
135 int __real_timer_delete (timer_t timerid);
137 int __real_timer_settime(timer_t timerid,
139 const struct itimerspec *value,
140 struct itimerspec *ovalue);
142 int __real_timer_gettime(timer_t timerid,
143 struct itimerspec *value);
145 int __real_timer_getoverrun(timer_t timerid);
int clock_gettime(clockid_t clock_id, struct timespec *tp)
Read the specified clock.
Definition: clock.c:176
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
Sleep some amount of time.
Definition: clock.c:290
int timer_getoverrun(timer_t timerid)
Get expiration overruns count since the most recent timer expiration signal delivery.
Definition: timer.c:517
int timer_create(clockid_t clockid, const struct sigevent *__restrict__ evp, timer_t *__restrict__ timerid)
Create a timer object.
Definition: timer.c:133
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
Sleep some amount of time.
Definition: clock.c:374
int timer_gettime(timer_t timerid, struct itimerspec *value)
Get timer next expiration date and reload value.
Definition: timer.c:457
int clock_getres(clockid_t clock_id, struct timespec *res)
Get the resolution of the specified clock.
Definition: clock.c:80
int clock_settime(clockid_t clock_id, const struct timespec *tp)
Set the specified clock.
Definition: clock.c:226
int timer_delete(timer_t timerid)
Delete a timer object.
Definition: timer.c:264
int timer_settime(timer_t timerid, int flags, const struct itimerspec *__restrict__ value, struct itimerspec *__restrict__ ovalue)
Start or stop a timer.
Definition: timer.c:335