* transcode_data.h (rb_trans_elem_t): new field: from and to.
[ruby-svn.git] / wince / time.h
blob531b2aacfdefc9f9ea18005521c21faf1f068b2f
1 #ifndef _TIME_WINCE_H
2 #define _TIME_WINCE_H 1
4 #include <winbase.h>
5 #include <sys/types.h>
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 extern int daylight;
12 extern int _timezone, timezone;
13 extern char *tzname[2];
15 #if 0
16 #define _DAY_SEC (24L * 60L * 60L) /* secs in a day */
17 #define _YEAR_SEC (365L * _DAY_SEC) /* secs in a year */
18 #define _FOUR_YEAR_SEC (1461L * _DAY_SEC) /* secs in a 4 year interval */
19 #define _DEC_SEC 315532800L /* secs in 1970-1979 */
20 #define _BASE_YEAR 70L /* 1970 is the base year */
21 #define _BASE_DOW 4 /* 01-01-70 was a Thursday */
22 #define _LEAP_YEAR_ADJUST 17L /* Leap years 1900 - 1970 */
23 #define _MAX_YEAR 138L /* 2038 is the max year */
24 #endif
26 #ifndef _TM_DEFINED
27 struct tm {
28 int tm_sec; /* seconds after the minute - [0,59] */
29 int tm_min; /* minutes after the hour - [0,59] */
30 int tm_hour; /* hours since midnight - [0,23] */
31 int tm_mday; /* day of the month - [1,31] */
32 int tm_mon; /* months since January - [0,11] */
33 int tm_year; /* years since 1900 */
34 int tm_wday; /* days since Sunday - [0,6] */
35 int tm_yday; /* days since January 1 - [0,365] */
36 int tm_isdst; /* daylight savings time flag */
38 #define _TM_DEFINED
39 #endif
42 typedef struct {
43 int yr; // year of interest
44 int yd; // day of year
45 long ms; // milli-seconds in the day
46 } transitionTime;
48 time_t mktime(struct tm* pt);
49 time_t time( time_t *timer );
50 struct tm *localtime(const time_t *ptime);
51 struct tm *gmtime(const time_t *tod);
52 char* ctime( const time_t *t );
53 char* asctime(const struct tm *tptr);
54 void tzset();
55 int clock(void);
56 time_t wce_FILETIME2time_t(const FILETIME* pf);
59 #ifdef __cplusplus
61 #endif
63 #endif