37#ifndef _RTEMS_TIMESPEC_H
38#define _RTEMS_TIMESPEC_H
67static inline bool rtems_timespec_is_valid(
68 const struct timespec *time
86static inline bool rtems_timespec_less_than(
87 const struct timespec *lhs,
88 const struct timespec *rhs
105static inline time_t rtems_timespec_add_to(
106 struct timespec *time,
107 const struct timespec *add
123static inline uint32_t rtems_timespec_to_ticks(
124 const struct timespec *time
140static inline void rtems_timespec_from_ticks(
142 struct timespec *time
160static inline void rtems_timespec_subtract(
161 const struct timespec *start,
162 const struct timespec *end,
163 struct timespec *result
182static inline void rtems_timespec_divide_by_integer(
183 const struct timespec *time,
185 struct timespec *result
204static inline void rtems_timespec_divide(
205 const struct timespec *lhs,
206 const struct timespec *rhs,
207 uint32_t *ival_percentage,
208 uint32_t *fval_percentage
224static inline void rtems_timespec_set(
225 struct timespec *_time,
227 uint32_t _nanoseconds
241static inline void rtems_timespec_zero(
242 struct timespec *_time
257static inline time_t rtems_timespec_get_seconds(
258 struct timespec *_time
273static inline uint32_t rtems_timespec_get_nanoseconds(
274 struct timespec *_time
291static inline bool rtems_timespec_greater_than(
292 const struct timespec *_lhs,
293 const struct timespec *_rhs
309static inline bool rtems_timespec_equal_to(
310 const struct timespec *lhs,
311 const struct timespec *rhs
void _Timespec_Divide(const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage)
Divides a timespec by another timespec.
Definition: timespecdivide.c:45
bool _Timespec_Less_than(const struct timespec *lhs, const struct timespec *rhs)
Checks if the left hand side timespec is less than the right one.
Definition: timespeclessthan.c:46
uint32_t _Timespec_To_ticks(const struct timespec *time)
Converts timespec to number of ticks.
Definition: timespectoticks.c:51
void _Timespec_From_ticks(uint32_t ticks, struct timespec *time)
Converts ticks to timespec.
Definition: timespecfromticks.c:46
#define _Timespec_Get_nanoseconds(_time)
Get nanoseconds portion of timespec.
Definition: timespec.h:110
#define _Timespec_Greater_than(_lhs, _rhs)
The Timespec "greater than" operator.
Definition: timespec.h:179
#define _Timespec_Set(_time, _seconds, _nanoseconds)
Set timespec to seconds nanosecond.
Definition: timespec.h:69
bool _Timespec_Is_valid(const struct timespec *time)
Checks if timespec is valid.
Definition: timespecisvalid.c:45
void _Timespec_Subtract(const struct timespec *start, const struct timespec *end, struct timespec *result)
Subtracts two timespec.
Definition: timespecsubtract.c:45
time_t _Timespec_Add_to(struct timespec *time, const struct timespec *add)
Adds two timespecs.
Definition: timespecaddto.c:46
#define _Timespec_Equal_to(lhs, rhs)
The Timespec "equal to" operator.
Definition: timespec.h:193
#define _Timespec_Get_seconds(_time)
Get seconds portion of timespec.
Definition: timespec.h:98
#define _Timespec_Set_to_zero(_time)
Sets the Timespec to Zero.
Definition: timespec.h:83
void _Timespec_Divide_by_integer(const struct timespec *time, uint32_t iterations, struct timespec *result)
Divides timespec by an integer.
Definition: timespecdividebyinteger.c:45
This header file provides the interfaces of the Timespec Helpers.