source: branches/VUT/0.2/chcdemo/Timers.h @ 10

Revision 10, 777 bytes checked in by gametools, 20 years ago (diff)

vienna university of technology first files

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