4 #include <_types/_time_t.h> 11 #pragma mark - Types and Definitions - 13 #define CLOCKS_PER_SEC 1000000L 17 #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) 18 #define __tm_gmtoff tm_gmtoff 19 #define __tm_zone tm_zone 27 #define _STRUCT_TIMESPEC 34 #define _STRUCT_TIMEVAL 56 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \ 57 defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 58 #define CLOCK_REALTIME 0 59 #define CLOCK_MONOTONIC 1 60 #define CLOCK_PROCESS_CPUTIME_ID 2 61 #define CLOCK_THREAD_CPUTIME_ID 3 62 #define CLOCK_MONOTONIC_RAW 4 63 #define CLOCK_REALTIME_COARSE 5 64 #define CLOCK_MONOTONIC_COARSE 6 65 #define CLOCK_BOOTTIME 7 66 #define CLOCK_REALTIME_ALARM 8 67 #define CLOCK_BOOTTIME_ALARM 9 68 #define CLOCK_SGI_CYCLE 10 71 #define TIMER_ABSTIME 1 81 #pragma mark - Functions - 85 #ifndef DISABLE_UNIMPLEMENTED_LIBC_APIS 90 size_t strftime(
char* __restrict,
size_t,
const char* __restrict,
const struct tm* __restrict);
94 char*
ctime(
const time_t*);
99 #if defined(_GNU_SOURCE) || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) || \ 101 char*
asctime_r(
const struct tm* __restrict,
char* __restrict);
103 #ifndef DISABLE_UNIMPLEMENTED_LIBC_APIS 104 struct tm* gmtime_r(
const time_t* __restrict,
struct tm* __restrict);
105 struct tm* localtime_r(
const time_t* __restrict,
struct tm* __restrict);
106 char* ctime_r(
const time_t*,
char*);
116 int timer_create(
clockid_t,
struct sigevent* __restrict,
timer_t* __restrict);
118 int timer_settime(
timer_t,
int,
const struct itimerspec* __restrict,
struct itimerspec* __restrict);
119 int timer_gettime(
timer_t,
struct itimerspec*);
122 extern char* tzname[2];
123 #endif // DISABLE_UNIMPLEMENTED_LIBC_APIS 126 #if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE) 127 #ifndef DISABLE_UNIMPLEMENTED_LIBC_APIS 128 char* strptime(
const char* __restrict,
const char* __restrict,
struct tm* __restrict);
130 extern long timezone;
131 extern int getdate_err;
132 struct tm* getdate(
const char*);
133 #endif // DISABLE_UNIMPLEMENTED_LIBC_APIS 136 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 137 #ifndef DISABLE_UNIMPLEMENTED_LIBC_APIS 138 int stime(
const time_t*);
139 time_t timegm(
struct tm*);
140 #endif // DISABLE_UNIMPLEMENTED_LIBC_APIS
char * ctime(const time_t *)
struct tm * gmtime(const time_t *)
double difftime(time_t, time_t)
int timespec_get(struct timespec *, int)
time_t mktime(struct tm *)
struct tm * localtime(const time_t *)
char * asctime_r(const struct tm *restrict tm, char *restrict buf)
size_t strftime(char *__restrict, size_t, const char *__restrict, const struct tm *__restrict)
char * asctime(const struct tm *)