comparison ext/UnitTest++/src/Win32/TimeHelpers.h @ 37:0d325e9d5953

added unittest++ files into ext. Not hooked into build scripts yet
author jasoka@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 12 Jul 2008 12:00:57 +0000
parents
children
comparison
equal deleted inserted replaced
36:6f1227f4932b 37:0d325e9d5953
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 int GetTimeInMs() const;
21
22 private:
23 __int64 GetTime() const;
24
25 void* m_threadId;
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