|
||||
File indexing completed on 2025-01-18 10:12:01
0001 // @(#)root/gl:$Id$ 0002 // Author: Richard Maunder 25/05/2005 0003 0004 /************************************************************************* 0005 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. * 0006 * All rights reserved. * 0007 * * 0008 * For the licensing terms see $ROOTSYS/LICENSE. * 0009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 0010 *************************************************************************/ 0011 0012 #ifndef ROOT_TGLStopwatch 0013 #define ROOT_TGLStopwatch 0014 0015 #include "Rtypes.h" 0016 0017 ////////////////////////////////////////////////////////////////////////// 0018 // // 0019 // TGLStopwatch // 0020 // // 0021 // Stopwatch object for timing GL work. We do not use the TStopwatch as // 0022 // we need to perform GL flushing to get accurate times + we record // 0023 // timing overheads here. // 0024 // 0025 // MT: Bypassed all of the overhead stuff. It does not seem reasonable 0026 // anyway. Besides it was being initialized outside of a valid GL 0027 // context and coused random crashes (especially on 64-bit machines with 0028 // nvidia cards). 0029 // 0030 ////////////////////////////////////////////////////////////////////////// 0031 0032 class TGLStopwatch 0033 { 0034 private: 0035 // Fields 0036 Double_t fStart; //! start time (millisec) 0037 Double_t fEnd; //! end time (millisec) 0038 Double_t fLastRun; //! time of last run (milisec) 0039 0040 // Methods 0041 Double_t GetClock(void) const; 0042 0043 public: 0044 TGLStopwatch(); 0045 virtual ~TGLStopwatch(); // ClassDef introduces virtual fns 0046 0047 void Start(); 0048 Double_t Lap() const; 0049 Double_t End(); 0050 Double_t LastRun() const { return fLastRun; } 0051 0052 ClassDef(TGLStopwatch,0) // a GL stopwatch utility class 0053 }; 0054 0055 #endif // ROOT_TGLStopwatch
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |