| 
                 
                    FreeRTOS:
                    POSIX
                 
             | 
        
| Return to main page ↑ | 
Time types. More...
Go to the source code of this file.
Data Structures | |
| struct | timespec | 
| represents an elapsed time  More... | |
| struct | itimerspec | 
| timer  More... | |
Macros | |
Unit conversion constants.  | |
| #define | MICROSECONDS_PER_SECOND ( 1000000LL ) | 
| #define | NANOSECONDS_PER_SECOND ( 1000000000LL ) | 
| #define | NANOSECONDS_PER_TICK ( NANOSECONDS_PER_SECOND / configTICK_RATE_HZ ) | 
Clock identifiers.  | |
| #define | CLOCK_REALTIME 0 | 
| #define | CLOCK_MONOTONIC 1 | 
A number used to convert the value returned by the clock() function into seconds.  | |
| #define | CLOCKS_PER_SEC ( ( clock_t ) configTICK_RATE_HZ ) | 
Flag indicating time is absolute.  | |
For functions taking timer objects, this refers to the clock associated with the timer.  | |
| #define | TIMER_ABSTIME 0x01 | 
Functions | |
| 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... | |
| int | timer_create (clockid_t clockid, struct sigevent *evp, timer_t *timerid) | 
| Create a per-process timer.  More... | |
| int | timer_delete (timer_t timerid) | 
| Delete a per-process timer.  More... | |
| int | timer_getoverrun (timer_t timerid) | 
| Get the timer overrun count.  More... | |
| int | timer_gettime (timer_t timerid, struct itimerspec *value) | 
| Get the amount of time until the timer expires.  More... | |
| int | timer_settime (timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue) | 
| Set the time until the next expiration of the timer.  More... | |
| #define MICROSECONDS_PER_SECOND ( 1000000LL ) | 
Microseconds per second.
| #define NANOSECONDS_PER_SECOND ( 1000000000LL ) | 
Nanoseconds per second.
| #define NANOSECONDS_PER_TICK ( NANOSECONDS_PER_SECOND / configTICK_RATE_HZ ) | 
Nanoseconds per FreeRTOS tick.
| #define CLOCK_REALTIME 0 | 
The identifier of the system-wide clock measuring real time.
| #define CLOCK_MONOTONIC 1 | 
The identifier for the system-wide monotonic clock.
| 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. | 
Create a per-process timer.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_create.html
| 0 | - Upon successful completion, with location referenced by timerid updated. | 
| -1 | - If an error occurs. errno is also set. | 
| int timer_delete | ( | timer_t | timerid | ) | 
Delete a per-process timer.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_delete.html
| 0 | - Upon successful completion. | 
| int timer_getoverrun | ( | timer_t | timerid | ) | 
Get the timer overrun count.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_getoverrun.html
| 0 | - Always return 0, since signals are not supported. | 
| int timer_gettime | ( | timer_t | timerid, | 
| struct itimerspec * | value | ||
| ) | 
Get the amount of time until the timer expires.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_gettime.html
| 0 | - Upon successful completion. | 
| int timer_settime | ( | timer_t | timerid, | 
| int | flags, | ||
| const struct itimerspec * | value, | ||
| struct itimerspec * | ovalue | ||
| ) | 
Set the time until the next expiration of the timer.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_settime.html
| 0 | - Upon successful completion. | 
| -1 | - An error occurred, errno is also set. |