-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWatch.h
49 lines (37 loc) · 1.21 KB
/
Watch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _SIMPLE_WATCH_H
#define _SIMPLE_WATCH_H
////////////////////////////////////////////////////////////////////////////////
//
// General definitions
//
// Including the definitions for general using.
//
// These definitions are generally used in different operation system.
//
////////////////////////////////////////////////////////////////////////////////
typedef struct tagSimpleWatch
{
//Start Time
SimpleTime timeStart;
//Stop Time
SimpleTime timeStop;
//Counter
//When running loop, the counter would count the loop time.
//It would like a heart beaten.
//You should add the counter when finishing a loop.
_UINT32 nCount;
//Performance Counters
_UINT32 nPerformanceCounters[3];
}
SimpleWatch;
////////////////////////////////////////////////////////////////////////////////
//
// General functions
//
////////////////////////////////////////////////////////////////////////////////
extern void InitializeWatch(SimpleWatch* pWatch);
extern _BOOL StartWatch(SimpleWatch* pWatch);
extern _BOOL StopWatch(SimpleWatch* pWatch);
extern _STRING DumpWatch(_STRING lpstrFormat,SimpleWatch* pWatch);
////////////////////////////////////////////////////////////////////////////////
#endif //End of the header file.