blob: 09a60aa428ffb6d17fb03ca104ef89dcb3fc7cfa (
plain) (
blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
|
/**
* @file rtems/posix/time.h
*/
/*
*
*
* $Id$
*/
#ifndef _RTEMS_POSIX_TIME_H
#define _RTEMS_POSIX_TIME_H
#include <rtems/score/tod.h>
/*
* Seconds from January 1, 1970 to January 1, 1988. Used to account for
* differences between POSIX API and RTEMS core.
*
* XXX probably able to be removed once core switches completely to timespec
* XXX for current TOD.
*/
#define POSIX_TIME_SECONDS_1970_THROUGH_1988 TOD_SECONDS_1970_THROUGH_1988
/*
* _POSIX_Timespec_subtract
*/
void _POSIX_Timespec_subtract(
const struct timespec *the_start,
const struct timespec *end,
struct timespec *result
);
/*
* _POSIX_Timespec_to_interval
*/
Watchdog_Interval _POSIX_Timespec_to_interval(
const struct timespec *time
);
/*
* _POSIX_Interval_to_timespec
*/
void _POSIX_Interval_to_timespec(
Watchdog_Interval ticks,
struct timespec *time
);
/*
* _POSIX_Absolute_timeout_to_ticks
*/
int _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
);
#endif
|