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 ) 85 #if !defined( posixconfigENABLE_ITIMERSPEC ) || ( posixconfigENABLE_ITIMERSPEC == 1 ) 97 #if !defined( posixconfigENABLE_TM ) || ( posixconfigENABLE_TM == 1 ) 214 struct tm * result );
244 const struct tm * timeptr );
int tm_min
Definition: time.h:106
int timer_delete(timer_t timerid)
Delete a per-process timer.
Definition: FreeRTOS_POSIX_timer.c:166
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
int tm_mday
Definition: time.h:108
struct timespec it_interval
Definition: time.h:92
int tm_year
Definition: time.h:110
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:203
int timer_gettime(timer_t timerid, struct itimerspec *value)
Get the amount of time until the timer expires.
Definition: FreeRTOS_POSIX_timer.c:286
time_t tv_sec
Definition: time.h:80
int clock_getres(clockid_t clock_id, struct timespec *res)
Returns the resolution of a clock.
Definition: FreeRTOS_POSIX_clock.c:72
int clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
Access a process CPU-time clock.
Definition: FreeRTOS_POSIX_clock.c:59
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
High resolution sleep.
Definition: FreeRTOS_POSIX_clock.c:229
int tm_mon
Definition: time.h:109
Signal event structure.
Definition: signal.h:61
int clock_settime(clockid_t clock_id, const struct timespec *tp)
Sets the time for the specified clock.
Definition: FreeRTOS_POSIX_clock.c:187
long tv_nsec
Definition: time.h:81
int clockid_t
Used for clock ID type in the clock and timer functions. Enabled/disabled by posixconfigENABLE_CLOCKI...
Definition: types.h:52
struct tm * localtime_r(const time_t *timer, struct tm *result)
Convert a time value to a broken-down local time.
Definition: FreeRTOS_POSIX_clock.c:203
int timer_getoverrun(timer_t timerid)
Get the timer overrun count.
Definition: FreeRTOS_POSIX_timer.c:193
struct timespec it_value
Definition: time.h:93
time_t tm_tick
Definition: time.h:104
timer
Definition: time.h:90
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:126
time_t time(time_t *tloc)
Get time.
Definition: FreeRTOS_POSIX_clock.c:284
clock_t clock(void)
Report CPU time used.
Definition: FreeRTOS_POSIX_clock.c:50
int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
Create a per-process timer.
Definition: FreeRTOS_POSIX_timer.c:114
calendar representation of time
Definition: time.h:102
int tm_wday
Definition: time.h:111
int tm_yday
Definition: time.h:112
uint32_t clock_t
Used for system times in clock ticks or CLOCKS_PER_SEC. Enabled/disabled by posixconfigENABLE_CLOCK_T...
Definition: types.h:44
void * timer_t
Used for timer ID returned by timer_create(). Enabled/disabled by posixconfigENABLE_TIMER_T.
Definition: types.h:150
represents an elapsed time
Definition: time.h:78
int tm_sec
Definition: time.h:105
int pid_t
Used for process IDs and process group IDs. Enabled/disabled by posixconfigENABLE_PID_T.
Definition: types.h:68
int tm_hour
Definition: time.h:107
int tm_isdst
Definition: time.h:113
int64_t time_t
Used for time in seconds. Enabled/disabled by posixconfigENABLE_TIME_T.
Definition: types.h:142
size_t strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
Convert date and time to a string.
Definition: FreeRTOS_POSIX_clock.c:259