Revision 418, 0.6 kB
(checked in by vbarta, 15 years ago)
|
#27: added UnitTest?++ to bdm sources, changed test_user_data to use it
|
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 | { |
---|
17 | public: |
---|
18 | Timer(); |
---|
19 | void Start(); |
---|
20 | double GetTimeInMs() const; |
---|
21 | |
---|
22 | private: |
---|
23 | __int64 GetTime() const; |
---|
24 | |
---|
25 | void* m_threadHandle; |
---|
26 | |
---|
27 | #if defined(_WIN64) |
---|
28 | unsigned __int64 m_processAffinityMask; |
---|
29 | #else |
---|
30 | unsigned long m_processAffinityMask; |
---|
31 | #endif |
---|
32 | |
---|
33 | __int64 m_startTime; |
---|
34 | __int64 m_frequency; |
---|
35 | }; |
---|
36 | |
---|
37 | |
---|
38 | namespace TimeHelpers |
---|
39 | { |
---|
40 | void SleepMs (int ms); |
---|
41 | } |
---|
42 | |
---|
43 | |
---|
44 | } |
---|
45 | |
---|
46 | |
---|
47 | |
---|
48 | #endif |
---|