4.104.114.84.95
Line | |
---|
1 | /* |
---|
2 | * |
---|
3 | * |
---|
4 | * $Id$ |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef __RTEMS_POSIX_TIME_h |
---|
8 | #define __RTEMS_POSIX_TIME_h |
---|
9 | |
---|
10 | #include <rtems/score/tod.h> |
---|
11 | |
---|
12 | /* |
---|
13 | * Seconds from January 1, 1970 to January 1, 1988. Used to account for |
---|
14 | * differences between POSIX API and RTEMS core. |
---|
15 | */ |
---|
16 | |
---|
17 | #define POSIX_TIME_SECONDS_1970_THROUGH_1988 \ |
---|
18 | (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \ |
---|
19 | (4 * TOD_SECONDS_PER_DAY)) |
---|
20 | |
---|
21 | /*PAGE |
---|
22 | * |
---|
23 | * _POSIX_Timespec_subtract |
---|
24 | */ |
---|
25 | |
---|
26 | void _POSIX_Timespec_subtract( |
---|
27 | const struct timespec *the_start, |
---|
28 | const struct timespec *end, |
---|
29 | struct timespec *result |
---|
30 | ); |
---|
31 | |
---|
32 | /* |
---|
33 | * _POSIX_Timespec_to_interval |
---|
34 | */ |
---|
35 | |
---|
36 | Watchdog_Interval _POSIX_Timespec_to_interval( |
---|
37 | const struct timespec *time |
---|
38 | ); |
---|
39 | |
---|
40 | /*PAGE |
---|
41 | * |
---|
42 | * _POSIX_Interval_to_timespec |
---|
43 | */ |
---|
44 | |
---|
45 | void _POSIX_Interval_to_timespec( |
---|
46 | Watchdog_Interval ticks, |
---|
47 | struct timespec *time |
---|
48 | ); |
---|
49 | |
---|
50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.