# TIME - [Overview](#section537944755165622) - [Summary](#section506383298165622) - [Files](#files) - [Data Structures](#nested-classes) - [Macros](#define-members) - [Functions](#func-members) - [Details](#section1629487800165622) - [Function](#section1113575540165622) - [asctime\(\)](#ga416a0a99a5bab4c030e93d21152727f4) - [asctime\_r\(\)](#ga8eb1bca8a6fdc63173a83f1c8cb28e15) - [clock\_getres\(\)](#ga822b364014350d2d70bbd0ccaab1f476) - [clock\_gettime\(\)](#ga28ec1219021575a4b9a7c502b2e9a72c) - [clock\_nanosleep\(\)](#ga23d3356807a1cb25b5f64651c4aa7d33) - [clock\_settime\(\)](#ga04dbb6f7216d70a1b206741564d4d0fb) - [ctime\(\)](#ga6e58d33339fabd469b2f4790b0f2b843) - [ctime\_r\(\)](#gae6eed522503f70a5cf05be0be558b125) - [difftime\(\)](#ga1901c00eb89e8e35ea193c6a4676679c) - [ftime\(\)](#gad225ab16a149ff9aab8fb5c36f29ca0c) - [getdate\(\)](#gae85b268128fa533b20949464ce34165a) - [getitimer\(\)](#ga87cde44d5a31b1524f925d980c959985) - [gettimeofday\(\)](#ga5ef4514eca25b6c6b73c5a54b8bc9e2b) - [gmtime\(\)](#ga30d9732f32117a94652e28512905bfb9) - [gmtime\_r\(\)](#ga91bb7adea9b0b36acde8dba3012c01a5) - [localtime\(\)](#ga70311f8aa60fc5ebbd76c55ea10bc899) - [localtime\_r\(\)](#gad8c4ed240ddbd645502ac2f0a306aee0) - [mktime\(\)](#gafc0e3f373a3ea00b37714f1b621ae0b1) - [nanosleep\(\)](#gafbe0e411e8bf89275e7cd46d0aeedc4b) - [setitimer\(\)](#ga81245d77d2f570933cc81f13a101bff8) - [settimeofday\(\)](#ga6e6617fc349ed4777425d667ff250fa7) - [stime\(\)](#ga69f8377385b2eeee376712dc9f0e3f71) - [strftime\(\)](#gab94643a711fc91727b668553d4a8806b) - [strftime\_l\(\)](#ga74c011f36d0ad959f0312dec8a5c8dc8) - [strptime\(\)](#ga8454b83c5b4fb93a9dcdd72ab586de22) - [time\(\)](#gae7841e681c8c9d59818568d39553642c) - [timegm\(\)](#ga4fd5240e99b2a9bf19bc0fe39f6ffc07) - [timer\_create\(\)](#gaf7dce9c851a2e1a65aaf818b95487431) - [timer\_delete\(\)](#ga61fa078bdadbd957cfcdfb12d0592ac1) - [timer\_getoverrun\(\)](#ga6ecdedfd7f417a3d93aa7a18ff0ac582) - [timer\_gettime\(\)](#ga8f65c6a88588c951e0b11629e56714a4) - [timer\_settime\(\)](#gade973e87fffe05aed7f1e97c1d15178e) ## **Overview** **Description:** Provides time-related structures and functions. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Files
Provides structures and functions related to the system time. |
|
Provides structures and functions related to the curren time. |
|
gettimeofday (struct timeval *__restrict value, void *__restrict ovalue) |
|
setitimer (int w, const struct itimerval *__restrict value, struct itimerval *__restrict ovalue) |
|
settimeofday (const struct timeval *tv, const struct timezone *tz) |
|
|
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. |
struct tm * Converts the number of seconds to the UTC time in the tm structure. |
|
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. |
|
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.) |
|
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) |
|
|
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. |
|
Converts the broken-down time in the tm structure to the number of seconds. |
Indicates the pointer to the broken-down time in the tm structure. |
Indicates the pointer to the broken-down time in the tm structure. |
|
Indicates the clock ID, which can be CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE or CLOCK_MONOTONIC_RAW. |
|
Indicates the clock ID, which can be CLOCK_REALTIME, CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC, CLOCK_MONOTONIC_COARSE, or CLOCK_MONOTONIC_RAW. |
|
Indicates the clock ID. Only CLOCK_REALTIME is supported. |
|
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. |
|
Indicates the clock ID. Only CLOCK_REALTIME is supported. |
|
Indicates the pointer to the number of milliseconds. timezone and dstflag are set to 0. |
Indicates the pointer to the time string. The format is specified by the file defined by the environment variable DATEMSK. |
Indicates the timer type. Only ITIMER_REAL is supported. |
|
Indicates the pointer to the timeval structure that contains the time. |
|
Indicates the pointer to the tm structure. |
Indicates the pointer to the tm structure. |
Indicates the pointer to the broken-down time in the tm structure. |
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. |
|
Indicates the timer type. Currently, only ITIMER_REAL is supported. |
|
Indicates the pointer to the original timer value before the current setting, which can be NULL. |
Indicates the pointer to the time zone to set. This parameter is not used yet. |
Indicates the pointer to the broken-down time in the tm structure. |
Indicates the pointer to the broken-down time in the tm structure. |
|
Indicates the required programming language. Currently, only C programming language is supported. |
Indicates the pointer to the string that contains only time data. |
|
Indicates the pointer to the tm structure. |
Indicates the pointer to the number of seconds. You can also pass NULL to use the return value. |
Indicates the pointer to the broken-down time in the tm structure to convert. |
Indicates the clock ID. Only CLOCK_REALTIME is supported. |
|
Indicates the pointer to the asynchronous notification signal and action, which can be NULL. |
|
The value of evp is not NULL and sigev_notify is not SIGEV_SIGNAL. |