POSIX Timers option group.
More...
|
| int | clock_getres (clockid_t clock_id, struct timespec *ts) |
| | Get the resolution of a clock.
|
| |
| int | clock_gettime (clockid_t clock_id, struct timespec *ts) |
| | Get the current time of a clock.
|
| |
| int | clock_settime (clockid_t clock_id, const struct timespec *ts) |
| | Set the time of a clock.
|
| |
| int | nanosleep (const struct timespec *rqtp, struct timespec *rmtp) |
| | Sleep for a specified number of nanoseconds (high-resolution sleep).
|
| |
| int | timer_create (clockid_t clockId, struct sigevent *ZRESTRICT evp, timer_t *ZRESTRICT timerid) |
| | Create a per-process timer.
|
| |
| int | timer_delete (timer_t timerid) |
| | Delete a per-process timer.
|
| |
| int | timer_getoverrun (timer_t timerid) |
| | Get the number of timer overruns since the last timer expiration notification.
|
| |
| int | timer_gettime (timer_t timerid, struct itimerspec *its) |
| | Get the time remaining until the next timer expiration.
|
| |
| int | timer_settime (timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue) |
| | Arm or disarm a per-process timer.
|
| |
POSIX Timers option group.
◆ CLOCK_REALTIME
| #define CLOCK_REALTIME ((clockid_t)SYS_CLOCK_REALTIME) |
Clock measuring real (wall-clock) time.
Definition at line 107 of file time.h.
◆ CLOCKS_PER_SEC
| #define CLOCKS_PER_SEC 1000000 |
Number of clock ticks per second as seen by clock().
Definition at line 113 of file time.h.
◆ TIMER_ABSTIME
| #define TIMER_ABSTIME SYS_TIMER_ABSTIME |
◆ clock_getres()
◆ clock_gettime()
◆ clock_settime()
◆ nanosleep()
◆ timer_create()
◆ timer_delete()
| int timer_delete |
( |
timer_t |
timerid | ) |
|
◆ timer_getoverrun()
| int timer_getoverrun |
( |
timer_t |
timerid | ) |
|
◆ timer_gettime()
◆ timer_settime()
Arm or disarm a per-process timer.
- Parameters
-
| timerid | Timer to set. |
| flags | 0 for a relative time, TIMER_ABSTIME for an absolute time. |
| value | New expiration time and interval; set it_value to zero to disarm. |
| ovalue | Output: previous timer value, or NULL. |
- Returns
- 0 on success, or -1 with errno set on failure.
- See also
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/timer_settime.html