Xenomai 3.3.2
Loading...
Searching...
No Matches
time.h
1/*
2 * Copyright (C) 2005 Philippe Gerum <rpm@xenomai.org>.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17 */
18#pragma GCC system_header
19#include_next <time.h>
20
21#ifndef _COBALT_TIME_H
22#define _COBALT_TIME_H
23
24/* Re-read in case we came from selective __need* block. */
25#include_next <time.h>
26#include <cobalt/wrappers.h>
27#include <cobalt/uapi/time.h>
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33struct timex;
34
35COBALT_DECL_TIME64(int, clock_getres, __clock_getres64,
36 (clockid_t clock_id, struct timespec *tp));
37
38COBALT_DECL_TIME64(int, clock_gettime, __clock_gettime64,
39 (clockid_t clock_id, struct timespec *tp));
40
41COBALT_DECL_TIME64(int, clock_settime, __clock_settime64,
42 (clockid_t clock_id, const struct timespec *tp));
43
44COBALT_DECL_TIME64(int, clock_adjtime, __clock_adjtime64,
45 (clockid_t clock_id, struct timex *tx));
46
47COBALT_DECL_TIME64(int, clock_nanosleep, __clock_nanosleep_time64,
48 (clockid_t clock_id, int flags, const struct timespec *rqtp,
49 struct timespec *rmtp));
50
51COBALT_DECL_TIME64(time_t, time, __time64, (time_t *t));
52
53COBALT_DECL_TIME64(int, nanosleep, __nanosleep64,
54 (const struct timespec *rqtp, struct timespec *rmtp));
55
56COBALT_DECL(int, timer_create,
57 (clockid_t clockid, const struct sigevent *__restrict__ evp,
58 timer_t *__restrict__ timerid));
59
60COBALT_DECL(int, timer_delete, (timer_t timerid));
61
62COBALT_DECL_TIME64(int, timer_settime, __timer_settime64,
63 (timer_t timerid, int flags, const struct itimerspec *value,
64 struct itimerspec *ovalue));
65
66COBALT_DECL_TIME64(int, timer_gettime, __timer_gettime64,
67 (timer_t timerid, struct itimerspec *value));
68
69COBALT_DECL(int, timer_getoverrun, (timer_t timerid));
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif /* !_COBALT_TIME_H */
int timer_create(clockid_t clockid, const struct sigevent *__restrict__ evp, timer_t *__restrict__ timerid))
Create a timer.
Definition timer.c:75
int timer_delete(timer_t timerid))
Delete a timer object.
Definition timer.c:106
int timer_getoverrun(timer_t timerid))
Get expiration overruns count since the most recent timer expiration signal delivery.
Definition timer.c:255