STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
xtimec.h
Go to the documentation of this file.
1 /* xtimec.h -- header for high-resolution time functions */
2 #pragma once
3 #ifndef _THR_XTIMEC_H
4 #define _THR_XTIMEC_H
5 #ifndef RC_INVOKED
6 #include <thr/xthrcommon.h>
7 #include <time.h>
8 
9  #pragma pack(push,_CRT_PACKING)
10  #pragma warning(push,3)
11  #pragma push_macro("new")
12  #undef new
13 
14 #ifdef __cplusplus
15 extern "C" { // C linkage
16 #endif /* __cplusplus */
17 
18 typedef struct xtime
19  { /* store time with nanosecond resolution */
20  __time64_t sec;
21  long nsec;
22  } xtime;
23 
24 _CRTIMP2_PURE int __cdecl xtime_get(xtime*, int);
25 
26 _CRTIMP2_PURE long __cdecl _Xtime_diff_to_millis(const xtime *);
27 _CRTIMP2_PURE long __cdecl _Xtime_diff_to_millis2(const xtime*, const xtime *);
28 _CRTIMP2_PURE long long __cdecl _Xtime_get_ticks(void);
29 #define _XTIME_NSECS_PER_TICK 100
30 #define _XTIME_TICKS_PER_TIME_T (long long)10000000
31 
32 _CRTIMP2_PURE long long __cdecl _Query_perf_counter(void);
33 _CRTIMP2_PURE long long __cdecl _Query_perf_frequency(void);
34 
35 #ifdef __cplusplus
36 } // extern "C"
37 #endif
38  #pragma pop_macro("new")
39  #pragma warning(pop)
40  #pragma pack(pop)
41 #endif /* RC_INVOKED */
42 #endif /* _THR_XTIMEC_H */
43 
44 /*
45  * This file is derived from software bearing the following
46  * restrictions:
47  *
48  * (c) Copyright William E. Kempf 2001
49  *
50  * Permission to use, copy, modify, distribute and sell this
51  * software and its documentation for any purpose is hereby
52  * granted without fee, provided that the above copyright
53  * notice appear in all copies and that both that copyright
54  * notice and this permission notice appear in supporting
55  * documentation. William E. Kempf makes no representations
56  * about the suitability of this software for any purpose.
57  * It is provided "as is" without express or implied warranty.
58  */
59 
60 /*
61  * Copyright (c) by P.J. Plauger. All rights reserved.
62  * Consult your license regarding permissions and restrictions.
63 V6.50:0009 */
_CRTIMP2_PURE long long __cdecl _Xtime_get_ticks(void)
_CRTIMP2_PURE long long __cdecl _Query_perf_frequency(void)
_CRTIMP2_PURE long long __cdecl _Query_perf_counter(void)
__time64_t sec
Definition: xtimec.h:20
struct xtime xtime
_CRTIMP2_PURE long __cdecl _Xtime_diff_to_millis2(const xtime *, const xtime *)
Definition: xtimec.h:18
_CRTIMP2_PURE int __cdecl xtime_get(xtime *, int)
_CRTIMP2_PURE long __cdecl _Xtime_diff_to_millis(const xtime *)
long nsec
Definition: xtimec.h:21
#define _CRTIMP2_PURE
Definition: yvals.h:494