# TIME ## **Overview** Provides time-related structures and functions. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Files
Provides structures and functions related to the curren time. |
|
Provides structures and functions related to the process time. |
|
time (time_t *t) |
|
difftime (time_t time1, time_t time2) |
|
Converts the broken-down time in the tm structure into seconds. |
|
strftime (char *restrict s, size_t n, const char *restrict f, const struct tm *restrict tm) |
Converts the broken-down time in the tm structure to a string in the required format. |
gmtime (const time_t *t) |
struct tm * Converts the number of seconds to the UTC time in the tm structure. |
localtime (const time_t *t) |
struct tm * Converts the number of seconds to the local time in the tm structure. |
Converts the broken-down time in the tm structure into a string. |
|
ctime (const time_t *timep) |
|
strftime_l (char *__restrict s, size_t n, const char *__restrict f, const struct tm *__restrict tm, locale_t loc) |
Converts the broken-down time in the tm structure to a string in a specified programming language and format. |
gmtime_r (const time_t *__restrict t, struct tm *__restrict tm) |
struct tm * Converts the number of seconds to the UTC time in the tm structure. (This function is reentrant.) |
localtime_r (const time_t *__restrict t, struct tm *__restrict tm) |
struct tm * Converts the number of seconds to the local time in the tm structure. (This function is reentrant.) |
asctime_r (const struct tm *__restrict tm, char *__restrict buf) |
Converts the broken-down time in the tm structure into a string. (This function is reentrant.) |
ctime_r (const time_t *t, char *buf) |
Converts the date and time into a string. (This function is reentrant.) |
nanosleep (const struct timespec *tspec1, struct timespec *tspec2) |
|
clock_getres (clockid_t id, struct timespec *tspec) |
|
clock_gettime (clockid_t id, struct timespec *tspec) |
|
clock_settime (clockid_t id, const struct timespec *tspec) |
|
clock_nanosleep (clockid_t id, int flag, const struct timespec *tspec1, struct timespec *tspec2) |
Pauses the current thread until a specified time of a clock arrives. |
timer_create (clockid_t id, struct sigevent *__restrict evp, timer_t *__restrict t) |
|
timer_delete (timer_t t) |
|
timer_settime (timer_t t, int flags, const struct itimerspec *__restrict val, struct itimerspec *__restrict old) |
|
timer_gettime (timer_t t, struct itimerspec *tspec) |
|
timer_getoverrun (timer_t t) |
|
Converts a time string to the broken-down time in the tm structure. |
|
getdate (const char *buf) |
struct tm * Converts a time string to the broken-down time in the tm structure. |
stime (const time_t *t) |
|
Converts the broken-down time in the tm structure to the number of seconds. |
tm | Indicates the pointer to the broken-down time in the tm structure. |
tm | Indicates the pointer to the broken-down time in the tm structure. |
buf | Indicates the pointer to the buffer for storing the string. |
id | Indicates the clock ID. Only CLOCK_REALTIME is supported. |
tspec | Indicates the pointer to the time to set. |
timep | Indicates the number of seconds to convert. |
t | Indicates the pointer to the number of seconds to convert. |
buf | Indicates the pointer to the buffer for storing the string. |
time1 | Indicates the first time. |
time2 | Indicates the second time. |
tp | Indicates the pointer to the number of milliseconds. timezone and dstflag are set to 0. |
buf | Indicates the pointer to the time string. The format is specified by the file defined by the environment variable DATEMSK. |
t | Indicates the pointer to the number of seconds to convert. |
t | Indicates the pointer to the number of seconds to convert. |
tm | Indicates the pointer to the tm structure. |
t | Indicates the pointer to the number of seconds to convert. |
t | Indicates the pointer to the number of seconds to convert. |
tm | Indicates the pointer to the tm structure. |
tm | Indicates the pointer to the broken-down time in the tm structure. |
tspec1 | Indicates the pointer to the minimum duration that the current thread is paused. Currently, the unit of precision is tick, and the discrepancy is fewer than 2 ticks. |
tspec2 | This parameter is not used yet. |
t | Indicates the pointer to the number of seconds to set. |
s | Indicates the pointer to the string. |
n | Indicates the size of the buffer for storing the string. |
f | Indicates the pointer to the required format. |
tm | Indicates the pointer to the broken-down time in the tm structure. |
s | Indicates the pointer to the string. |
n | Indicates the size of the buffer for storing the string. |
f | Indicates the pointer to the required format. |
tm | Indicates the pointer to the broken-down time in the tm structure. |
loc | Indicates the required programming language. Currently, only C programming language is supported. |
s | Indicates the pointer to the string that contains only time data. |
format | Indicates the pointer to the required format. |
tm | Indicates the pointer to the tm structure. |
t | Indicates the pointer to the number of seconds. You can also pass NULL to use the return value. |
tm | Indicates the pointer to the broken-down time in the tm structure to convert. |
id | Indicates the clock ID. Only CLOCK_REALTIME is supported. |
evp | Indicates the pointer to the asynchronous notification signal and action, which can be NULL. |
t | Indicates the pointer to the timer ID. |
The value of evp is not NULL and sigev_notify is not SIGEV_SIGNAL. |
t | Indicates the ID of the timer to delete. |
t | Indicates the ID of the timer to obtain. |
t | Indicates the ID of the timer to obtain. |
tspec | Indicates the pointer to the timer duration and interval. |
tm | Indicates the pointer to the tms structure that contains the clock ticks, which can be NULL. |