RTEMS
|
Contains Helpers for Manipulating Timespecs. 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. More... | |
#define | _Timespec_Set_to_zero(_time) |
Sets the Timespec to Zero. More... | |
#define | _Timespec_Get_seconds(_time) ((_time)->tv_sec) |
Get seconds portion of timespec. More... | |
#define | _Timespec_Get_nanoseconds(_time) ((_time)->tv_nsec) |
Get nanoseconds portion of timespec. More... | |
#define | _Timespec_Greater_than(_lhs, _rhs) _Timespec_Less_than( _rhs, _lhs ) |
The Timespec "greater than" operator. More... | |
#define | _Timespec_Equal_to(lhs, rhs) |
The Timespec "equal to" operator. More... | |
Functions | |
uint64_t | _Timespec_Get_as_nanoseconds (const struct timespec *time) |
Gets the timestamp as nanoseconds. More... | |
bool | _Timespec_Is_valid (const struct timespec *time) |
Checks if timespec is valid. More... | |
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. More... | |
uint32_t | _Timespec_Add_to (struct timespec *time, const struct timespec *add) |
Adds two timespecs. More... | |
uint32_t | _Timespec_To_ticks (const struct timespec *time) |
Converts timespec to number of ticks. More... | |
void | _Timespec_From_ticks (uint32_t ticks, struct timespec *time) |
Converts ticks to timespec. More... | |
void | _Timespec_Subtract (const struct timespec *start, const struct timespec *end, struct timespec *result) |
Subtracts two timespec. More... | |
void | _Timespec_Divide_by_integer (const struct timespec *time, uint32_t iterations, struct timespec *result) |
Divides timespec by an integer. More... | |
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. More... | |
Contains Helpers for Manipulating Timespecs.
Definition in file timespec.h.