16 #ifndef _RTEMS_SCORE_TIMESPEC_H 17 #define _RTEMS_SCORE_TIMESPEC_H 47 #define _Timespec_Set( _time, _seconds, _nanoseconds ) \ 49 (_time)->tv_sec = (_seconds); \ 50 (_time)->tv_nsec = (_nanoseconds); \ 61 #define _Timespec_Set_to_zero( _time ) \ 63 (_time)->tv_sec = 0; \ 64 (_time)->tv_nsec = 0; \ 76 #define _Timespec_Get_seconds( _time ) \ 88 #define _Timespec_Get_nanoseconds( _time ) \ 101 const struct timespec *time
115 const struct timespec *time
130 const struct timespec *lhs,
131 const struct timespec *rhs
145 #define _Timespec_Greater_than( _lhs, _rhs ) \ 146 _Timespec_Less_than( _rhs, _lhs ) 159 #define _Timespec_Equal_to( lhs, rhs ) \ 160 ( ((lhs)->tv_sec == (rhs)->tv_sec) && \ 161 ((lhs)->tv_nsec == (rhs)->tv_nsec) \ 176 struct timespec *time,
177 const struct timespec *add
191 const struct timespec *time
205 struct timespec *time
221 const struct timespec *start,
222 const struct timespec *end,
223 struct timespec *result
240 const struct timespec *time,
242 struct timespec *result
259 const struct timespec *lhs,
260 const struct timespec *rhs,
261 uint32_t *ival_percentage,
262 uint32_t *fval_percentage
uint32_t _Timespec_To_ticks(const struct timespec *time)
Convert timespec to number of ticks.
Definition: timespectoticks.c:27
bool _Timespec_Is_valid(const struct timespec *time)
Check if timespec is valid.
Definition: timespecisvalid.c:24
void _Timespec_Divide_by_integer(const struct timespec *time, uint32_t iterations, struct timespec *result)
Divide timespec by an integer.
Definition: timespecdividebyinteger.c:25
void _Timespec_Subtract(const struct timespec *start, const struct timespec *end, struct timespec *result)
Subtract two timespec.
Definition: timespecsubtract.c:24
void _Timespec_Divide(const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage)
Divide a timespec by anonther timespec.
Definition: timespecdivide.c:24
bool _Timespec_Less_than(const struct timespec *lhs, const struct timespec *rhs)
The Timespec "less than" operator.
Definition: timespeclessthan.c:25
void _Timespec_From_ticks(uint32_t ticks, struct timespec *time)
Convert ticks to timespec.
Definition: timespecfromticks.c:25
uint64_t _Timespec_Get_as_nanoseconds(const struct timespec *time)
Get the timestamp as nanoseconds.
Definition: timespecgetasnanoseconds.c:23
uint32_t _Timespec_Add_to(struct timespec *time, const struct timespec *add)
Add two timespecs.
Definition: timespecaddto.c:25