Revision 706, 0.5 kB
(checked in by smidl, 15 years ago)
|
eol-native
|
-
Property svn:eol-style set to
native
|
Line | |
---|
1 | #ifndef UNITTEST_TIMEHELPERS_H |
---|
2 | #define UNITTEST_TIMEHELPERS_H |
---|
3 | |
---|
4 | #include "../Config.h" |
---|
5 | |
---|
6 | |
---|
7 | #ifdef UNITTEST_MINGW |
---|
8 | #ifndef __int64 |
---|
9 | #define __int64 long long |
---|
10 | #endif |
---|
11 | #endif |
---|
12 | |
---|
13 | namespace UnitTest { |
---|
14 | |
---|
15 | class Timer { |
---|
16 | public: |
---|
17 | Timer(); |
---|
18 | void Start(); |
---|
19 | double GetTimeInMs() const; |
---|
20 | |
---|
21 | private: |
---|
22 | __int64 GetTime() const; |
---|
23 | |
---|
24 | void* m_threadHandle; |
---|
25 | |
---|
26 | #if defined(_WIN64) |
---|
27 | unsigned __int64 m_processAffinityMask; |
---|
28 | #else |
---|
29 | unsigned long m_processAffinityMask; |
---|
30 | #endif |
---|
31 | |
---|
32 | __int64 m_startTime; |
---|
33 | __int64 m_frequency; |
---|
34 | }; |
---|
35 | |
---|
36 | |
---|
37 | namespace TimeHelpers { |
---|
38 | void SleepMs ( int ms ); |
---|
39 | } |
---|
40 | |
---|
41 | |
---|
42 | } |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | #endif |
---|