source: GTP/trunk/App/Demos/Vis/CHC_revisited/Timers.h @ 2746

Revision 2746, 567 bytes checked in by mattausch, 16 years ago (diff)
Line 
1/** Various time measuring routines
2    @author Jiri Bittner
3*/
4
5#ifndef __TIMERS_H
6#define __TIMERS_H
7
8void initTiming();
9
10void finishTiming();
11
12long getTime();
13
14double timeDiff(long t1,long t2);
15
16char * timeString();
17
18
19/** Example of usage:
20see timers.h for diffirent possibilities of what is really measured..
21
22
23InitTiming();
24
25long t1, t2, t3;
26
27t1 = GetTime();
28
29Algortihm1();
30
31t2 = GetTime();
32
33Algorithm2();
34
35t3 = GetTime();
36
37
38cout<<"Algorithm 1"<<TimeDiff(t1, t2)<<"[ms]"<<endl;
39cout<<"Algorithm 2"<<TimeDiff(t2, t3)<<"[ms]"<<endl;
40
41
42FinishTiming();
43
44*/
45
46
47#endif
Note: See TracBrowser for help on using the repository browser.