31 #ifndef _FREERTOS_POSIX_UTILS_ 32 #define _FREERTOS_POSIX_UTILS_ 67 const struct timespec *
const pxCurrentTime,
68 TickType_t *
const pxResult );
80 TickType_t *
const pxResult );
91 struct timespec *
const pxDestination );
120 int64_t llNanoseconds,
int UTILS_TimespecCompare(const struct timespec *const x, const struct timespec *const y)
Compare x == y.
Definition: FreeRTOS_POSIX_utils.c:330
int UTILS_TimespecToTicks(const struct timespec *const pxTimespec, TickType_t *const pxResult)
Converts a struct timespec to FreeRTOS ticks.
Definition: FreeRTOS_POSIX_utils.c:103
void UTILS_NanosecondsToTimespec(int64_t llSource, struct timespec *const pxDestination)
Converts an integer value to a timespec.
Definition: FreeRTOS_POSIX_utils.c:163
bool UTILS_ValidateTimespec(const struct timespec *const pxTimespec)
Checks that a timespec conforms to POSIX.
Definition: FreeRTOS_POSIX_utils.c:378
int UTILS_TimespecSubtract(const struct timespec *const x, const struct timespec *const y, struct timespec *const pxResult)
Calculates pxResult = x - y. If the result is negative contents of pResult are undefined.
Definition: FreeRTOS_POSIX_utils.c:275
size_t UTILS_strnlen(const char *const pcString, size_t xMaxLength)
Calculates the length of pcString, up to xMaxLength.
Definition: FreeRTOS_POSIX_utils.c:42
int UTILS_TimespecAddNanoseconds(const struct timespec *const x, int64_t llNanoseconds, struct timespec *const pxResult)
Calculates pxResult = x + ( struct timespec ) nanosec.
Definition: FreeRTOS_POSIX_utils.c:234
int UTILS_TimespecAdd(const struct timespec *const x, const struct timespec *const y, struct timespec *const pxResult)
Calculates pxResult = x + y.
Definition: FreeRTOS_POSIX_utils.c:185
int UTILS_AbsoluteTimespecToDeltaTicks(const struct timespec *const pxAbsoluteTime, const struct timespec *const pxCurrentTime, TickType_t *const pxResult)
Calculates the number of ticks between now and a given timespec.
Definition: FreeRTOS_POSIX_utils.c:62
represents an elapsed time
Definition: time.h:99