Go to the documentation of this file.
33 #ifndef _FREERTOS_POSIX_TIME_H_
34 #define _FREERTOS_POSIX_TIME_H_
44 #define MICROSECONDS_PER_SECOND ( 1000000LL )
45 #define NANOSECONDS_PER_SECOND ( 1000000000LL )
46 #define NANOSECONDS_PER_TICK ( NANOSECONDS_PER_SECOND / configTICK_RATE_HZ )
53 #define CLOCK_REALTIME 0
54 #define CLOCK_MONOTONIC 1
61 #define CLOCKS_PER_SEC ( ( clock_t ) configTICK_RATE_HZ )
70 #define TIMER_ABSTIME 0x01
73 #if !defined( posixconfigENABLE_TIMESPEC ) || ( posixconfigENABLE_TIMESPEC == 1 )
86 #if !defined( posixconfigENABLE_ITIMERSPEC ) || ( posixconfigENABLE_ITIMERSPEC == 1 )
struct timespec it_interval
Definition: time.h:94
uint32_t clock_t
Used for system times in clock ticks or CLOCKS_PER_SEC.
Definition: types.h:49
int clock_settime(clockid_t clock_id, const struct timespec *tp)
Sets the time for the specified clock.
Definition: FreeRTOS_POSIX_clock.c:196
int clockid_t
Used for clock ID type in the clock and timer functions.
Definition: types.h:59
int clock_gettime(clockid_t clock_id, struct timespec *tp)
Returns the current value for the specified clock, clock_id.
Definition: FreeRTOS_POSIX_clock.c:90
long tv_nsec
Definition: time.h:82
clock_t clock(void)
Report CPU time used.
Definition: FreeRTOS_POSIX_clock.c:50
int timer_getoverrun(timer_t timerid)
Get the timer overrun count.
Definition: FreeRTOS_POSIX_timer.c:180
Signal event structure.
Definition: signal.h:63
int timer_delete(timer_t timerid)
Delete a per-process timer.
Definition: FreeRTOS_POSIX_timer.c:153
time_t tv_sec
Definition: time.h:81
int timer_gettime(timer_t timerid, struct itimerspec *value)
Get the amount of time until the timer expires.
Definition: FreeRTOS_POSIX_timer.c:295
timer
Definition: time.h:93
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
High resolution sleep with specifiable clock.
Definition: FreeRTOS_POSIX_clock.c:122
int clock_getres(clockid_t clock_id, struct timespec *res)
Returns the resolution of a clock.
Definition: FreeRTOS_POSIX_clock.c:72
int pid_t
Used for process IDs and process group IDs.
Definition: types.h:79
int clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
Access a process CPU-time clock.
Definition: FreeRTOS_POSIX_clock.c:59
struct timespec it_value
Definition: time.h:95
int64_t time_t
Used for time in seconds.
Definition: types.h:175
void * timer_t
Used for timer ID returned by timer_create().
Definition: types.h:185
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
High resolution sleep.
Definition: FreeRTOS_POSIX_clock.c:212
represents an elapsed time
Definition: time.h:80
int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
Create a per-process timer.
Definition: FreeRTOS_POSIX_timer.c:101
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.
Definition: FreeRTOS_POSIX_timer.c:190