![]() |
RTEMS 6.1
|
This header file provides the interfaces of the Timespec Helpers. More...
#include <stdbool.h>#include <stdint.h>#include <time.h>Go to the source code of this file.
Macros | |
| #define | _Timespec_Set(_time, _seconds, _nanoseconds) |
| Set timespec to seconds nanosecond. | |
| #define | _Timespec_Set_to_zero(_time) |
| Sets the Timespec to Zero. | |
| #define | _Timespec_Get_seconds(_time) ((_time)->tv_sec) |
| Get seconds portion of timespec. | |
| #define | _Timespec_Get_nanoseconds(_time) ((_time)->tv_nsec) |
| Get nanoseconds portion of timespec. | |
| #define | _Timespec_Greater_than(_lhs, _rhs) _Timespec_Less_than( _rhs, _lhs ) |
| The Timespec "greater than" operator. | |
| #define | _Timespec_Equal_to(lhs, rhs) |
| The Timespec "equal to" operator. | |
Functions | |
| uint64_t | _Timespec_Get_as_nanoseconds (const struct timespec *time) |
| Gets the timestamp as nanoseconds. | |
| bool | _Timespec_Is_non_negative (const struct timespec *time) |
| Checks if the values in time are non-negative. | |
| bool | _Timespec_Is_valid (const struct timespec *time) |
| Checks if timespec is valid. | |
| 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. | |
| time_t | _Timespec_Add_to (struct timespec *time, const struct timespec *add) |
| Adds two timespecs. | |
| uint32_t | _Timespec_To_ticks (const struct timespec *time) |
| Converts timespec to number of ticks. | |
| void | _Timespec_From_ticks (uint32_t ticks, struct timespec *time) |
| Converts ticks to timespec. | |
| void | _Timespec_Subtract (const struct timespec *start, const struct timespec *end, struct timespec *result) |
| Subtracts two timespec. | |
| void | _Timespec_Divide_by_integer (const struct timespec *time, uint32_t iterations, struct timespec *result) |
| Divides timespec by an integer. | |
| 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. | |
This header file provides the interfaces of the Timespec Helpers.