List of all members | Public Member Functions | Private Attributes
utl::RealTimeStopwatch Class Reference

#include "utl/RealTimeStopwatch.h"

Public Member Functions

double GetTime ()
 
 RealTimeStopwatch (const bool start=true)
 
void Reset ()
 
void Start ()
 
double Stop ()
 returns time since last call to Start() More...
 

Private Attributes

bool fIsStopped
 
struct timeval fStart
 
double fTimeSum
 

Detailed Description

Note: constructor starts the stopwatch. Use Reset() before starting it at the later time.

Author
D. Veberic
Date
16 May 2007

Definition at line 19 of file RealTimeStopwatch.h.

Constructor & Destructor Documentation

RealTimeStopwatch::RealTimeStopwatch ( const bool  start = true)

Definition at line 7 of file RealTimeStopwatch.cc.

References fStart.

Member Function Documentation

double RealTimeStopwatch::GetTime ( )

Definition at line 51 of file RealTimeStopwatch.cc.

References fIsStopped, fStart, fTimeSum, utl::microsecond, and utl::second.

Referenced by TestTime::TestRealTimeStopwatch().

void RealTimeStopwatch::Reset ( )

Definition at line 17 of file RealTimeStopwatch.cc.

References fIsStopped, and fTimeSum.

Referenced by TestTime::TestRealTimeStopwatch().

void RealTimeStopwatch::Start ( )

Definition at line 25 of file RealTimeStopwatch.cc.

References fIsStopped, and fStart.

Referenced by TestTime::TestRealTimeStopwatch().

double RealTimeStopwatch::Stop ( )

returns time since last call to Start()

Definition at line 35 of file RealTimeStopwatch.cc.

References fIsStopped, fStart, fTimeSum, utl::microsecond, and utl::second.

Referenced by fwk::RunController::FinishBranch(), and TestTime::TestRealTimeStopwatch().

Member Data Documentation

bool utl::RealTimeStopwatch::fIsStopped
private

Definition at line 31 of file RealTimeStopwatch.h.

Referenced by GetTime(), Reset(), Start(), and Stop().

struct timeval utl::RealTimeStopwatch::fStart
private

Definition at line 32 of file RealTimeStopwatch.h.

Referenced by GetTime(), RealTimeStopwatch(), Start(), and Stop().

double utl::RealTimeStopwatch::fTimeSum
private

Definition at line 33 of file RealTimeStopwatch.h.

Referenced by GetTime(), Reset(), and Stop().


The documentation for this class was generated from the following files:

, generated on Tue Sep 26 2023.