Iros
 
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1#pragma once
2
3#include <ccpp/bits/clock_t.h>
4#include <ccpp/bits/config.h>
5#include <ccpp/bits/size_t.h>
6#include <ccpp/bits/time_t.h>
7
8#if defined(__CCPP_C11) || defined(__CCPP_POSIX_EXTENSIONS)
10#endif
11
13
14struct tm {
15 int tm_sec;
16 int tm_min;
19 int tm_mon;
24};
25
26double difftime(time_t __time_end, time_t __time_start);
28
29#define CLOCKS_PER_SEC 1000000
31
32#ifdef __CCPP_C11
33#define TIME_UTC 1
34struct timespec timespec_get(struct timespec* __ts, int __base);
35#endif
36#ifdef __CCPP_C23
37int timespec_getres(struct timespec* __ts, int __base);
38#endif
39
40__CCPP_C23_DEPRECATED char* asctime(struct tm const* __tm);
41__CCPP_C23_DEPRECATED char* ctime(time_t const* __time);
42size_t strftime(char* __CCPP_RESTRICT __str, size_t __count, char const* __CCPP_RESTRICT __format,
43 struct tm const* __CCPP_RESTRICT __tm);
44
45struct tm* gmtime(time_t const* __time);
46#if defined(__CCPP_C23) || defined(__CCPP_POSIX_EXTENSIONS)
47struct tm* gmtime_r(time_t const* __CCPP_RESTRICT __time, struct tm* __CCPP_RESTRICT __tm);
48#endif
49struct tm* localtime(time_t const* __time);
50#if defined(__CCPP_C23) || defined(__CCPP_POSIX_EXTENSIONS)
51struct tm* localtime_r(time_t const* __CCPP_RESTRICT __time, struct tm* __CCPP_RESTRICT __tm);
52#endif
53time_t mktime(struct tm* __tm);
54
__CCPP_BEGIN_DECLARATIONS typedef __INT64_TYPE__ clock_t
Definition clock_t.h:7
#define __CCPP_RESTRICT
Definition config.h:62
#define __CCPP_END_DECLARATIONS
Definition config.h:8
#define __CCPP_C23_DEPRECATED
Definition config.h:23
#define __CCPP_BEGIN_DECLARATIONS
Definition config.h:7
Definition timespec.h:7
Definition time.h:14
int tm_mon
Definition time.h:19
int tm_year
Definition time.h:20
int tm_hour
Definition time.h:17
int tm_sec
Definition time.h:15
int tm_isdst
Definition time.h:23
int tm_yday
Definition time.h:22
int tm_mday
Definition time.h:18
int tm_min
Definition time.h:16
int tm_wday
Definition time.h:21
struct tm * localtime_r(time_t const *__CCPP_RESTRICT __time, struct tm *__CCPP_RESTRICT __tm)
double difftime(time_t __time_end, time_t __time_start)
struct tm * gmtime(time_t const *__time)
__CCPP_C23_DEPRECATED char * ctime(time_t const *__time)
time_t mktime(struct tm *__tm)
size_t strftime(char *__CCPP_RESTRICT __str, size_t __count, char const *__CCPP_RESTRICT __format, struct tm const *__CCPP_RESTRICT __tm)
struct tm * gmtime_r(time_t const *__CCPP_RESTRICT __time, struct tm *__CCPP_RESTRICT __tm)
struct tm * localtime(time_t const *__time)
clock_t clock(void)
__CCPP_C23_DEPRECATED char * asctime(struct tm const *__tm)
time_t time(time_t *__time)
__CCPP_BEGIN_DECLARATIONS typedef __INT64_TYPE__ time_t
Definition time_t.h:7