TStopwatch


class description - source file - inheritance tree

class TStopwatch : public TObject


    public:
TStopwatch TStopwatch() TStopwatch TStopwatch(TStopwatch&) void ~TStopwatch() static TClass* Class() void Continue() Int_t Counter() const Double_t CpuTime() static Double_t GetCPUTime() static Double_t GetRealTime() 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()

Double_t GetCPUTime()

void Print(Option_t *) 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)



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(TStopwatch&)
               void ~TStopwatch()


Author: Fons Rademakers 11/10/95
Last update: root/base:$Name: $:$Id: TStopwatch.cxx,v 1.4 2000/12/13 15:13:46 brun 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.