TStopwatch


class description - source file - inheritance tree

class TStopwatch : public TObject

    private:
static Double_t GetCPUTime() static Double_t GetRealTime() public:
TStopwatch TStopwatch() TStopwatch TStopwatch(const TStopwatch&) void ~TStopwatch() static TClass* Class() void Continue() Int_t Counter() const Double_t CpuTime() virtual TClass* IsA() const virtual void Print(Option_t* option) const Double_t RealTime() void Reset() void ResetCpuTime(Double_t time = 0) void ResetRealTime(Double_t time = 0) virtual void ShowMembers(TMemberInspector& insp, char* parent) void Start(Bool_t reset = kTRUE) void Stop() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
Double_t fStartRealTime wall clock start time Double_t fStopRealTime wall clock stop time Double_t fStartCpuTime cpu start time Double_t fStopCpuTime cpu stop time Double_t fTotalCpuTime total cpu time Double_t fTotalRealTime total real time TStopwatch::EState fState stopwatch state Int_t fCounter number of times the stopwatch was started public:
static const TStopwatch::EState kUndefined static const TStopwatch::EState kStopped static const TStopwatch::EState kRunning

Class Description

                                                                      
 TStopwatch                                                           
                                                                      
 Stopwatch class. This class returns the real and cpu time between    
 the start and stop events.                                           
                                                                      


TStopwatch()
 Create a stopwatch and start it.

void Start(Bool_t reset)
 Start the stopwatch. If reset is kTRUE reset the stopwatch before
 starting it (including the stopwatch counter).
 Use kFALSE to continue timing after a Stop() without
 resetting the stopwatch.

void Stop()
 Stop the stopwatch.

void Continue()
 Resume a stopped stopwatch. The stopwatch continues counting from the last
 Start() onwards (this is like the laptimer function).

Double_t RealTime()
 Return the realtime passed between the start and stop events. If the
 stopwatch was still running stop it first.

Double_t CpuTime()
 Return the cputime passed between the start and stop events. If the
 stopwatch was still running stop it first.

Double_t GetRealTime()
 Private static method returning system realtime.

Double_t GetCPUTime()
 Private static method returning system CPU time.

void Print(Option_t *opt) const
 Print the real and cpu time passed between the start and stop events.
 and the number of times (slices) this TStopwatch was called
 (if this number > 1). If opt="m" printout realtime in milli second
 precision.



Inline Functions


              Int_t Counter() const
               void Reset()
               void ResetCpuTime(Double_t time = 0)
               void ResetRealTime(Double_t time = 0)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
         TStopwatch TStopwatch(const TStopwatch&)
               void ~TStopwatch()


Author: Fons Rademakers 11/10/95
Last update: root/base:$Name: $:$Id: TStopwatch.cxx,v 1.6 2002/10/07 10:41:38 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Top of the page

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.