time.h (960B)
1 #ifndef __TIME 2 #define __TIME 3 4 #define CLOCKS_PER_SEC 1000000 5 #ifndef NULL 6 #define NULL 0 7 #endif 8 9 #if !defined(_CLOCK_T) && !defined(_CLOCK_T_) 10 #define _CLOCK_T 11 #define _CLOCK_T_ 12 typedef long clock_t; 13 #endif 14 15 #if !defined(_TIME_T) && !defined(_TIME_T_) 16 #define _TIME_T 17 #define _TIME_T_ 18 typedef long time_t; 19 #endif 20 21 #if !defined(_SIZE_T) && !defined(_SIZE_T_) 22 #define _SIZE_T 23 #define _SIZE_T_ 24 typedef unsigned long size_t; 25 #endif 26 27 struct tm { 28 int tm_sec; 29 int tm_min; 30 int tm_hour; 31 int tm_mday; 32 int tm_mon; 33 int tm_year; 34 int tm_wday; 35 int tm_yday; 36 int tm_isdst; 37 }; 38 extern clock_t clock(void); 39 extern double difftime(time_t, time_t); 40 extern time_t mktime(struct tm *); 41 extern time_t time(time_t *); 42 extern char *asctime(const struct tm *); 43 extern char *ctime(const time_t *); 44 extern struct tm *gmtime(const time_t *); 45 extern struct tm *localtime(const time_t *); 46 extern size_t strftime(char *, size_t, const char *, const struct tm *); 47 48 #endif /* __TIME */