Initial commit of visual studio 9 git build superproject.
[git-build-vc9.git] / tcrt / inc / time.h
blob3ef323bcf1ca41d9866925e7d025331a1215f3cc
1 /*=============================================================================
2 time.h :
4 Copyright © 2008 Bruno Santos <nayart3@gmail.com>
5 =============================================================================*/
7 #ifndef TCRT_TIME__H_
8 #define TCRT_TIME__H_
10 ///////////////////////////////////////////////////////////////////////////////
11 #include "tcrt.h"
13 ///////////////////////////////////////////////////////////////////////////////
14 TCRT_BEGIN_EXTERN_C
16 ///////////////////////////////////////////////////////////////////////////////
17 #ifndef _TIME_T_DEFINED
18 typedef long long time_t;
19 #define _TIME_T_DEFINED
20 #endif
22 #ifndef _CLOCK_T_DEFINED
23 typedef long long clock_t;
24 #define _CLOCK_T_DEFINED
25 #endif
27 #ifndef _TM_DEFINED
28 struct tm {
29 int tm_sec;
30 int tm_min;
31 int tm_hour;
32 int tm_mday;
33 int tm_mon;
34 int tm_year;
35 int tm_wday;
36 int tm_yday;
37 int tm_isdst;
39 #define _TM_DEFINED
40 #endif
42 extern clock_t CLOCKS_PER_SEC;
44 ///////////////////////////////////////////////////////////////////////////////
45 clock_t clock(void);
46 double difftime(time_t time2, time_t time1);
47 time_t mktime(struct tm* timeptr);
48 time_t time(time_t* timer);
50 char* asctime(const struct tm* timeptr);
51 char* ctime(const time_t* timer);
52 struct tm* gmtime(const time_t* timer);
53 struct tm* localtime(const time_t* timer);
54 size_t strftime(char* ptr, size_t maxsize, const char* format, const struct tm* timeptr);
56 ///////////////////////////////////////////////////////////////////////////////
57 struct tm* localtime_r(const time_t* timer, struct tm* result);
58 struct tm* gmtime_r(const time_t* timer, struct tm* result);
60 ///////////////////////////////////////////////////////////////////////////////
61 TCRT_END_EXTERN_C
63 // EOF ////////////////////////////////////////////////////////////////////////
64 #endif /* TCRT_TIME__H_ */