FreeRTOS:
POSIX
|
Return to main page ↑ |
Implementation of clock functions in time.h. More...
#include <stddef.h>
#include <string.h>
#include "FreeRTOS_POSIX.h"
#include "FreeRTOS_POSIX/errno.h"
#include "FreeRTOS_POSIX/time.h"
#include "FreeRTOS_POSIX/utils.h"
Functions | |
int | snprintf (char *s, size_t n, const char *format,...) |
clock_t | clock (void) |
Report CPU time used. More... | |
int | clock_getcpuclockid (pid_t pid, clockid_t *clock_id) |
Access a process CPU-time clock. More... | |
int | clock_getres (clockid_t clock_id, struct timespec *res) |
Returns the resolution of a clock. More... | |
int | clock_gettime (clockid_t clock_id, struct timespec *tp) |
Returns the current value for the specified clock, clock_id. More... | |
int | clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp) |
High resolution sleep with specifiable clock. More... | |
int | clock_settime (clockid_t clock_id, const struct timespec *tp) |
Sets the time for the specified clock. More... | |
int | nanosleep (const struct timespec *rqtp, struct timespec *rmtp) |
High resolution sleep. More... | |
Implementation of clock functions in time.h.
clock_t clock | ( | void | ) |
Report CPU time used.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock.html
Access a process CPU-time clock.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getcpuclockid.html
EPERM |
Returns the resolution of a clock.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html
0 | - Upon successful execution |
Returns the current value for the specified clock, clock_id.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_gettime.html
0 | - Upon successful completion. |
int clock_nanosleep | ( | clockid_t | clock_id, |
int | flags, | ||
const struct timespec * | rqtp, | ||
struct timespec * | rmtp | ||
) |
High resolution sleep with specifiable clock.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_nanosleep.html
0 | - Upon successful completion. |
EINVAL | - The rqtp argument specified a nanosecond value less than zero or greater than or equal to 1000 million. |
Sets the time for the specified clock.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_settime.html
-1 | with errno set to EPERM. |
High resolution sleep.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html
0 | - Upon successful completion. |
-1 | - The rqtp argument is invalid OR the rqtp argument specified a nanosecond value less than zero or greater than or equal to 1000 million. |