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
3 //
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // The _ftime() family of functions
7 //
8 #pragma once
9 
10 #include <corecrt.h>
11 
13 
14 
15 
16 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17 //
18 // Types
19 //
20 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
21 struct __timeb32
22 {
24  unsigned short millitm;
25  short timezone;
26  short dstflag;
27 };
28 
29 struct __timeb64
30 {
32  unsigned short millitm;
33  short timezone;
34  short dstflag;
35 };
36 
37 #if _CRT_INTERNAL_NONSTDC_NAMES && !defined _CRT_NO_TIME_T
38  struct timeb
39  {
40  time_t time;
41  unsigned short millitm;
42  short timezone;
43  short dstflag;
44  };
45 #endif
46 
47 
48 
49 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
50 //
51 // Functions
52 //
53 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
54 #ifdef _USE_32BIT_TIME_T
55  #define _timeb __timeb32
56  #define _ftime _ftime32
57  #define _ftime_s _ftime32_s
58 #else
59  #define _timeb __timeb64
60  #define _ftime _ftime64
61  #define _ftime_s _ftime64_s
62 #endif
63 
64 
65 
67 _ACRTIMP void __cdecl _ftime32(
68  _Out_ struct __timeb32* _Time
69  );
70 
72  _Out_ struct __timeb32* _Time
73  );
74 
76 _ACRTIMP void __cdecl _ftime64(
77  _Out_ struct __timeb64* _Time
78  );
79 
81  _Out_ struct __timeb64* _Time
82  );
83 
84 
85 
86 #if !defined RC_INVOKED && !defined __midl && _CRT_INTERNAL_NONSTDC_NAMES && !defined _CRT_NO_TIME_T
87 
88  #pragma warning(push)
89  #pragma warning(disable:4996)
90 
91  #ifdef _USE_32BIT_TIME_T
92 
93  static __inline void __CRTDECL ftime(struct timeb* const _Tmb)
94  {
95  _STATIC_ASSERT(sizeof(struct timeb) == sizeof(struct __timeb32));
96  _ftime32((struct __timeb32*)_Tmb);
97  }
98 
99  #else
100 
101  static __inline void __CRTDECL ftime(struct timeb* const _Tmb)
102  {
103  _STATIC_ASSERT(sizeof(struct timeb) == sizeof(struct __timeb64));
104  _ftime64((struct __timeb64*)_Tmb);
105  }
106 
107  #endif
108 
109  #pragma warning(pop)
110 
111 #endif
112 
113 
114 
#define _Out_
Definition: sal.h:342
short timezone
Definition: timeb.h:25
#define _ACRTIMP
Definition: corecrt.h:27
__time64_t time
Definition: timeb.h:31
#define _CRT_INSECURE_DEPRECATE(_Replacement)
Definition: vcruntime.h:269
int errno_t
Definition: corecrt.h:476
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
Definition: timeb.h:29
#define __CRTDECL
Definition: vcruntime.h:156
__time64_t time_t
Definition: corecrt.h:517
Definition: timeb.h:21
long __time32_t
Definition: corecrt.h:479
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
unsigned short millitm
Definition: timeb.h:32
_ACRTIMP errno_t __cdecl _ftime32_s(_Out_ struct __timeb32 *_Time)
__int64 __time64_t
Definition: corecrt.h:480
short timezone
Definition: timeb.h:33
__time32_t time
Definition: timeb.h:23
static __inline time_t __CRTDECL time(_Out_opt_ time_t *const _Time)
Definition: time.h:531
_STATIC_ASSERT(sizeof(unsigned int)<=_ALLOCA_S_MARKER_SIZE)
_ACRTIMP void __cdecl _ftime32(_Out_ struct __timeb32 *_Time)
_ACRTIMP errno_t __cdecl _ftime64_s(_Out_ struct __timeb64 *_Time)
short dstflag
Definition: timeb.h:34
unsigned short millitm
Definition: timeb.h:24
short dstflag
Definition: timeb.h:26
_ACRTIMP void __cdecl _ftime64(_Out_ struct __timeb64 *_Time)