![]() |
Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
|


Go to the source code of this file.
Data Structures | |
| struct | timespec |
| struct | itimerspec |
| struct | tm |
Macros | |
| #define | CLOCK_REALTIME 0 |
| #define | CLOCK_MONOTONIC 1 |
| #define | TIMER_ABSTIME 1 |
Functions | |
| int | clock_getres (clockid_t clockid, struct timespec *res) |
| Get the resolution (precision) of the specified clock ID. More... | |
| int | clock_gettime (clockid_t clockid, struct timespec *tp) |
| Retrieve the time of the specified clock ID. More... | |
| int | clock_settime (clockid_t clockid, const struct timespec *tp) |
| Set the time of the specified clock ID. More... | |
| int | timer_create (clockid_t clockid, struct sigevent *sevp, timer_t *timerid) |
| Create a new per-thread interval timer. More... | |
| int | timer_delete (timer_t timerid) |
| Delete the timer specified with the timer ID. More... | |
| int | timer_settime (timer_t timerid, int flags, const struct itimerspec *new_value, struct itimerspec *old_value) |
| Arm or disarm the timer specified by the timer ID. More... | |
| int | timer_gettime (timer_t timerid, struct itimerspec *curr_value) |
| Return the timer interval and the time until next expiration. More... | |
| time_t | time (time_t *tloc) |
| Return the time as the number of seconds since 1970-01-01 00:00:00 +0000 (UTC) More... | |
| int | nanosleep (const struct timespec *req, struct timespec *rem) |
| Suspend execution for a specified time. More... | |
| int | clock_nanosleep (clockid_t clockid, int flags, const struct timespec *req, struct timespec *rem) |
| High-resolution sleep with clock selection. More... | |
| struct tm * | localtime (const time_t *timep) |
| struct tm * | localtime_r (const time_t *timep, struct tm *result) |
| struct tm * | gmtime (const time_t *timep) |
| struct tm * | gmtime_r (const time_t *timep, struct tm *result) |
| time_t | mktime (struct tm *tm) |
| size_t | strftime (char *s, size_t max, const char *format, const struct tm *tm) |
| char * | strptime (const char *s, const char *format, struct tm *tm) |
| char * | ctime (const time_t *timep) |
| char * | ctime_r (const time_t *timep, char *buf) |
| int clock_getres | ( | clockid_t | clockid, |
| struct timespec * | res | ||
| ) |
Get the resolution (precision) of the specified clock ID.
| clk_id | The clock ID to provide. |
| res | The time object for returning the clock resolution. |
| int | 0 on success and nonzero error number on error. |
| int clock_gettime | ( | clockid_t | clockid, |
| struct timespec * | tp | ||
| ) |
Retrieve the time of the specified clock ID.
| clk_id | The clock ID to provide. |
| tp | The time object for returning the time. |
| int | 0 on success and nonzero error number on error. |
| int clock_nanosleep | ( | clockid_t | clockid, |
| int | flags, | ||
| const struct timespec * | req, | ||
| struct timespec * | rem | ||
| ) |
High-resolution sleep with clock selection.
| clockid | The clock ID to use. |
| flags | TIMER_ABSTIME for absolute time, otherwise relative. |
| req | Requested sleep time. |
| rem | Remaining time if interrupted (optional). |
| int | 0 on success and nonzero error number on error. |
| int clock_settime | ( | clockid_t | clockid, |
| const struct timespec * | tp | ||
| ) |
Set the time of the specified clock ID.
| clk_id | The clock ID to provide. |
| tp | The time object for setting the clock. |
| int | 0 on success and nonzero error number on error. |
Suspend execution for a specified time.
| req | Requested sleep time. |
| rem | Remaining time if interrupted (optional). |
| int | 0 on success and nonzero error number on error. |
| time_t time | ( | time_t * | tloc | ) |
Return the time as the number of seconds since 1970-01-01 00:00:00 +0000 (UTC)
| tloc | Same as return value if tloc is not NULL. |
| time_t | The time in seconds. |
| int timer_create | ( | clockid_t | clockid, |
| struct sigevent * | sevp, | ||
| timer_t * | timerid | ||
| ) |
Create a new per-thread interval timer.
| clk_id | The clock ID to provide. |
| sevp | For signaling an event when the timer expired. |
| timerid | For returning the ID of the newly created timer. |
| int | 0 on success and nonzero error number on error. |
| int timer_delete | ( | timer_t | timerid | ) |
Delete the timer specified with the timer ID.
| timerid | The timer ID to provide. |
| int | 0 on success and nonzero error number on error. |
| int timer_gettime | ( | timer_t | timerid, |
| struct itimerspec * | curr_value | ||
| ) |
Return the timer interval and the time until next expiration.
| timerid | The timer ID to provide. |
| curr_value | The timer object for returning the timer time. |
| int | 0 on success and nonzero error number on error. |
| int timer_settime | ( | timer_t | timerid, |
| int | flags, | ||
| const struct itimerspec * | new_value, | ||
| struct itimerspec * | old_value | ||
| ) |
Arm or disarm the timer specified by the timer ID.
| timerid | The timer ID to provide. |
| flags | Not used. |
| new_value | Pointer the the new timer setting. |
| old_value | Pointer to the memory space for storing the old timer setting. |
| int | 0 on success and nonzero error number on error. |