#ifndef ROOT_TStopwatch
#define ROOT_TStopwatch
#ifndef ROOT_TObject
#include "TObject.h"
#endif
class TStopwatch : public TObject {
private:
enum EState { kUndefined, kStopped, kRunning };
Double_t fStartRealTime;
Double_t fStopRealTime;
Double_t fStartCpuTime;
Double_t fStopCpuTime;
Double_t fTotalCpuTime;
Double_t fTotalRealTime;
EState fState;
Int_t fCounter;
static Double_t GetRealTime();
static Double_t GetCPUTime();
public:
TStopwatch();
void Start(Bool_t reset = kTRUE);
void Stop();
void Continue();
Int_t Counter() const { return fCounter; }
Double_t RealTime();
void Reset() { ResetCpuTime(); ResetRealTime(); }
void ResetCpuTime(Double_t time = 0) { Stop(); fTotalCpuTime = time; }
void ResetRealTime(Double_t time = 0) { Stop(); fTotalRealTime = time; }
Double_t CpuTime();
void Print(Option_t *option="") const;
ClassDef(TStopwatch,1)
};
#endif
Last change: Tue Dec 2 17:26:58 2008
Last generated: 2008-12-02 17:26
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.