STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
timeb.h
Go to the documentation of this file.
1 /***
2 *sys/timeb.h - definition/declarations for _ftime()
3 *
4 * Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 * This file define the _ftime() function and the types it uses.
8 * [System V]
9 *
10 * [Public]
11 *
12 ****/
13 
14 #pragma once
15 
16 #ifndef _INC_TIMEB
17 #define _INC_TIMEB
18 
19 #include <crtdefs.h>
20 
21 #if !defined (_WIN32)
22 #error ERROR: Only Win32 target supported!
23 #endif /* !defined (_WIN32) */
24 
25 
26 #pragma pack(push,_CRT_PACKING)
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31 
32 #ifdef _CRTBLD
33 #include <cruntime.h>
34 #endif /* _CRTBLD */
35 
36 
37 /* Define _CRTIMP */
38 
39 #ifndef _CRTIMP
40 #if defined(CRTDLL) && defined(_CRTBLD)
41 #define _CRTIMP __declspec(dllexport)
42 #else /* CRTDLL && _CRTBLD */
43 #ifdef _DLL
44 #define _CRTIMP __declspec(dllimport)
45 #else /* _DLL */
46 #define _CRTIMP
47 #endif /* _DLL */
48 #endif /* CRTDLL && _CRTBLD */
49 #endif /* _CRTIMP */
50 
51 
52 #if !defined (_W64)
53 #if !defined (__midl) && (defined (_X86_) || defined (_M_IX86))
54 #define _W64 __w64
55 #else /* !defined (__midl) && (defined (_X86_) || defined (_M_IX86)) */
56 #define _W64
57 #endif /* !defined (__midl) && (defined (_X86_) || defined (_M_IX86)) */
58 #endif /* !defined (_W64) */
59 
60 #ifndef _TIME32_T_DEFINED
61 typedef _W64 long __time32_t; /* 32-bit time value */
62 #define _TIME32_T_DEFINED
63 #endif /* _TIME32_T_DEFINED */
64 
65 #ifndef _TIME64_T_DEFINED
66 typedef __int64 __time64_t; /* 64-bit time value */
67 #define _TIME64_T_DEFINED
68 #endif /* _TIME64_T_DEFINED */
69 
70 #ifndef _TIME_T_DEFINED
71 #ifdef _USE_32BIT_TIME_T
72 typedef __time32_t time_t; /* time value */
73 #else /* _USE_32BIT_TIME_T */
74 typedef __time64_t time_t; /* time value */
75 #endif /* _USE_32BIT_TIME_T */
76 #define _TIME_T_DEFINED /* avoid multiple def's of time_t */
77 #endif /* _TIME_T_DEFINED */
78 
79 /* Structure returned by _ftime system call */
80 
81 #ifndef _TIMEB_DEFINED
82 struct __timeb32 {
83  __time32_t time;
84  unsigned short millitm;
85  short timezone;
86  short dstflag;
87  };
88 
89 #if !__STDC__
90 
91 /* Non-ANSI name for compatibility */
92 struct timeb {
93  time_t time;
94  unsigned short millitm;
95  short timezone;
96  short dstflag;
97  };
98 
99 
100 #endif /* !__STDC__ */
101 
102 struct __timeb64 {
103  __time64_t time;
104  unsigned short millitm;
105  short timezone;
106  short dstflag;
107  };
108 
109 #ifdef _USE_32BIT_TIME_T
110 
111 #define _timeb __timeb32
112 #define _ftime _ftime32
113 #define _ftime_s _ftime32_s
114 
115 #else /* _USE_32BIT_TIME_T */
116 
117 #define _timeb __timeb64
118 #define _ftime _ftime64
119 #define _ftime_s _ftime64_s
120 
121 #endif /* _USE_32BIT_TIME_T */
122 #define _TIMEB_DEFINED
123 #endif /* _TIMEB_DEFINED */
124 
125 #include <crtdefs.h>
126 
127 /* Function prototypes */
128 
129 _CRT_INSECURE_DEPRECATE(_ftime32_s) _CRTIMP void __cdecl _ftime32(_Out_ struct __timeb32 * _Time);
130 _CRTIMP errno_t __cdecl _ftime32_s(_Out_ struct __timeb32 * _Time);
131 _CRT_INSECURE_DEPRECATE(_ftime64_s) _CRTIMP void __cdecl _ftime64(_Out_ struct __timeb64 * _Time);
132 _CRTIMP errno_t __cdecl _ftime64_s(_Out_ struct __timeb64 * _Time);
133 
134 #if !defined (RC_INVOKED) && !defined (__midl)
135 #include <sys/timeb.inl>
136 #endif /* !defined (RC_INVOKED) && !defined (__midl) */
137 
138 #ifdef __cplusplus
139 }
140 #endif /* __cplusplus */
141 
142 #pragma pack(pop)
143 
144 #endif /* _INC_TIMEB */
#define _Out_
Definition: sal.h:351
short timezone
Definition: timeb.h:85
__time64_t time
Definition: timeb.h:103
#define _W64
Definition: timeb.h:56
_CRTIMP errno_t __cdecl _ftime64_s(_Out_ struct __timeb64 *_Time)
#define _CRTIMP
Definition: timeb.h:46
__time64_t time_t
Definition: timeb.h:74
_CRTIMP errno_t __cdecl _ftime32_s(_Out_ struct __timeb32 *_Time)
short dstflag
Definition: timeb.h:96
Definition: timeb.h:102
Definition: timeb.h:82
Definition: timeb.h:92
int errno_t
Definition: crtdefs.h:563
short timezone
Definition: timeb.h:95
unsigned short millitm
Definition: timeb.h:104
short timezone
Definition: timeb.h:105
__time32_t time
Definition: timeb.h:83
unsigned short millitm
Definition: timeb.h:94
__int64 __time64_t
Definition: timeb.h:66
time_t time
Definition: timeb.h:93
short dstflag
Definition: timeb.h:106
unsigned short millitm
Definition: timeb.h:84
short dstflag
Definition: timeb.h:86
_W64 long __time32_t
Definition: timeb.h:61
_CRT_INSECURE_DEPRECATE(_ftime32_s) _CRTIMP void __cdecl _ftime32(_Out_ struct __timeb32 *_Time)