ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
TGLStopwatch.h
Go to the documentation of this file.
1
// @(#)root/gl:$Id$
2
// Author: Richard Maunder 25/05/2005
3
4
/*************************************************************************
5
* Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TGLStopwatch
13
#define ROOT_TGLStopwatch
14
15
#include "
Rtypes.h
"
16
17
//////////////////////////////////////////////////////////////////////////
18
// //
19
// TGLStopwatch //
20
// //
21
// Stopwatch object for timing GL work. We do not use the TStopwatch as //
22
// we need to perform GL flushing to get accurate times + we record //
23
// timing overheads here. //
24
//
25
// MT: Bypassed all of the overhead stuff. It does not seem reasonable
26
// anyway. Besides it was being initialized outside of a valid GL
27
// context and coused random crashes (especially on 64-bit machines with
28
// nvidia cards).
29
//
30
//////////////////////////////////////////////////////////////////////////
31
32
class
TGLStopwatch
33
{
34
private
:
35
// Fields
36
Double_t fStart;
//! start time (millisec)
37
Double_t fEnd;
//! end time (millisec)
38
Double_t fLastRun;
//! time of last run (milisec)
39
40
// Methods
41
Double_t GetClock(
void
)
const
;
42
43
public
:
44
TGLStopwatch();
45
virtual
~TGLStopwatch();
// ClassDef introduces virtual fns
46
47
void
Start();
48
Double_t Lap()
const
;
49
Double_t End();
50
Double_t LastRun()
const
{
return
fLastRun; }
51
52
ClassDef(TGLStopwatch,0)
// a GL stopwatch utility class
53
};
54
55
#endif // ROOT_TGLStopwatch
Rtypes.h
graf3d
gl
inc
TGLStopwatch.h
Generated on Tue May 5 2020 14:02:40 for ROOT by
1.8.5