List of all members | Public Types | Public Member Functions | Private Attributes | Static Private Attributes
utl::Stopwatch Class Reference

#include "utl/Stopwatch.h"

Public Types

enum  CPUTime { eTotal, eUser, eSystem }
 

Public Member Functions

double GetCPUTime (const CPUTime kind=eTotal)
 
void Reset ()
 
void Start ()
 
void Stop ()
 
 Stopwatch ()
 

Private Attributes

bool fIsStopped
 
struct tms fStart
 
clock_t fSystemTimeSum
 
clock_t fUserTimeSum
 

Static Private Attributes

static const long fgClockTicks = sysconf(_SC_CLK_TCK)
 

Detailed Description

Author
D. Veberic
Date
13 May 2005

Definition at line 16 of file Stopwatch.h.

Member Enumeration Documentation

Enumerator
eTotal 
eUser 
eSystem 

Definition at line 19 of file Stopwatch.h.

Constructor & Destructor Documentation

Stopwatch::Stopwatch ( )

Definition at line 11 of file Stopwatch.cc.

References fStart.

Member Function Documentation

double Stopwatch::GetCPUTime ( const CPUTime  kind = eTotal)
void Stopwatch::Reset ( )
void Stopwatch::Start ( )
void Stopwatch::Stop ( )

Member Data Documentation

const long Stopwatch::fgClockTicks = sysconf(_SC_CLK_TCK)
staticprivate

Definition at line 33 of file Stopwatch.h.

Referenced by GetCPUTime().

bool utl::Stopwatch::fIsStopped
private

Definition at line 34 of file Stopwatch.h.

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

struct tms utl::Stopwatch::fStart
private

Definition at line 35 of file Stopwatch.h.

Referenced by GetCPUTime(), Start(), Stop(), and Stopwatch().

clock_t utl::Stopwatch::fSystemTimeSum
private

Definition at line 37 of file Stopwatch.h.

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

clock_t utl::Stopwatch::fUserTimeSum
private

Definition at line 36 of file Stopwatch.h.

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


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

, generated on Tue Sep 26 2023.