Prevented memory leak detection from considering anything
[pwlib.git] / include / ptlib / wm / time.h
blob5f7a6218a653bccf587272ab1e2a075030d4e925
1 //////////////////////////////////////////////////////
2 //
3 // VisualStudio 2005 PWLib Port,
4 // (c) 2007 Dinsk.net
5 // developer@dinsk.net
6 //
7 //////////////////////////////////////////////////////
8 //
9 // (c) Yuriy Gorvitovskiy
10 // for Openh323, www.Openh323.org
12 // Windows CE Port
14 // Definitions/declarations for time routines
16 // [Microsoft]
17 // [ANSI/System V]
18 // [Public]
19 //
21 #ifndef _TIME_H
22 #define _TIME_H
24 #define _INC_TIME // for wce.h
26 #include <windows.h>
27 #include <stdlib.h>
29 #ifndef _TM_DEFINED
30 #define _TM_DEFINED
31 struct tm {
32 int tm_sec; /* seconds after the minute - [0,59] */
33 int tm_min; /* minutes after the hour - [0,59] */
34 int tm_hour; /* hours since midnight - [0,23] */
35 int tm_mday; /* day of the month - [1,31] */
36 int tm_mon; /* months since January - [0,11] */
37 int tm_year; /* years since 1900 */
38 int tm_wday; /* days since Sunday - [0,6] */
39 int tm_yday; /* days since January 1 - [0,365] */
40 int tm_isdst; /* daylight savings time flag */
42 #endif // _TM_DEFINED
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 #ifndef _CLOCK_T_DEFINED
49 typedef long clock_t;
50 #define _CLOCK_T_DEFINED
51 #endif
53 /* Clock ticks macro - ANSI version */
54 #define CLOCKS_PER_SEC 1000
56 /* Function prototypes */
57 #if _WIN32_WCE < 0x502
58 clock_t clock(void);
59 struct tm * gmtime(const time_t* t);
60 struct tm * localtime(const time_t* t);
61 time_t mktime(struct tm* t);
62 time_t time(time_t* t);
63 #endif // _WIN32_WCE < 0x502
65 #if _WIN32_WCE < 0x501
66 size_t wcsftime(
67 wchar_t *strDest,
68 size_t maxsize,
69 const wchar_t *format,
70 const struct tm *timeptr
72 #endif
74 #ifndef __cplusplus
75 time_t __cdecl FileTimeToTime(const struct _FILETIME FileTime);
76 time_t __cdecl SystemTimeToTime(const struct _SYSTEMTIME* pSystemTime);
77 #else
78 time_t FileTimeToTime(const FILETIME FileTime);
79 time_t SystemTimeToTime(const LPSYSTEMTIME pSystemTime);
80 #endif
82 #ifdef __cplusplus
84 #endif
86 #endif /* _INC_TIME */