12 #define CLOCK_REALTIME 0
13 #define CLOCK_MONOTONIC 1
14 #define TIMER_ABSTIME 1
94 time_t
time(time_t *tloc);
132 struct tm *localtime(
const time_t *timep);
133 struct tm *localtime_r(
const time_t *timep,
struct tm *result);
134 struct tm *gmtime(
const time_t *timep);
135 struct tm *gmtime_r(
const time_t *timep,
struct tm *result);
136 time_t mktime(
struct tm *
tm);
137 size_t strftime(
char *s,
size_t max,
const char *format,
const struct tm *
tm);
142 char *strptime(
const char *s,
const char *format,
struct tm *
tm);
143 char *ctime(
const time_t *timep);
144 char *ctime_r(
const time_t *timep,
char *buf);
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.
Definition: time.c:166
int nanosleep(const struct timespec *req, struct timespec *rem)
Suspend execution for a specified time.
Definition: time.c:289
int clock_settime(clockid_t clockid, const struct timespec *tp)
Set the time of the specified clock ID.
Definition: time.c:131
int clock_nanosleep(clockid_t clockid, int flags, const struct timespec *req, struct timespec *rem)
High-resolution sleep with clock selection.
Definition: time.c:248
int timer_create(clockid_t clockid, struct sigevent *sevp, timer_t *timerid)
Create a new per-thread interval timer.
Definition: time.c:143
int clock_getres(clockid_t clockid, struct timespec *res)
Get the resolution (precision) of the specified clock ID.
Definition: time.c:100
time_t time(time_t *tloc)
Return the time as the number of seconds since 1970-01-01 00:00:00 +0000 (UTC)
Definition: time.c:185
int timer_gettime(timer_t timerid, struct itimerspec *curr_value)
Return the timer interval and the time until next expiration.
Definition: time.c:180
int clock_gettime(clockid_t clockid, struct timespec *tp)
Retrieve the time of the specified clock ID.
Definition: time.c:121
int timer_delete(timer_t timerid)
Delete the timer specified with the timer ID.
Definition: time.c:153