OSB_LIB::Stopwatch Class Reference

Collaboration diagram for OSB_LIB::Stopwatch:

Collaboration graph
[legend]
List of all members.

Detailed Description

A stopwatch to measure elapsed and system time.

Definition at line 62 of file stopwatch.h.

Public Member Functions

Private Attributes

Static Private Attributes

Classes


Constructor & Destructor Documentation

OSB_LIB::Stopwatch::Stopwatch (  ) 

Default constructor.


Member Function Documentation

void OSB_LIB::Stopwatch::read ( Interval  )  const

Read a (stopped) stopwatch.

void OSB_LIB::Stopwatch::reset (  ) 

Reset a stopwatch.

void OSB_LIB::Stopwatch::start (  )  [inline]

Start a stopwatch.

Definition at line 142 of file stopwatch.h.

References OSB_LIB::Stopwatch::Sws::cstime_, OSB_LIB::Stopwatch::Sws::cutime_, OSB_LIB::Stopwatch::Sws::rtime_, run_, OSB_LIB::Stopwatch::Sws::stime_, tbuf_, and OSB_LIB::Stopwatch::Sws::utime_.

void OSB_LIB::Stopwatch::stop (  )  [inline]

Stop a stopwatch.

Definition at line 153 of file stopwatch.h.

References accu_, cnt_, OSB_LIB::Stopwatch::Sws::cstime_, OSB_LIB::Stopwatch::Sws::cutime_, OSB_LIB::Stopwatch::Sws::rtime_, run_, OSB_LIB::Stopwatch::Sws::stime_, tbuf_, and OSB_LIB::Stopwatch::Sws::utime_.


Member Data Documentation

Sws OSB_LIB::Stopwatch::accu_ [private]

Accumulated times.

Definition at line 129 of file stopwatch.h.

Referenced by stop().

clock_t OSB_LIB::Stopwatch::clk_tck_ [static, private]

The number of clock ticks per second.

Definition at line 135 of file stopwatch.h.

long OSB_LIB::Stopwatch::cnt_ [private]

Number of calls to stop the watch.

Definition at line 127 of file stopwatch.h.

Referenced by stop().

Sws OSB_LIB::Stopwatch::run_ [private]

Times since last call to start().

Definition at line 131 of file stopwatch.h.

Referenced by start(), and stop().

struct tms OSB_LIB::Stopwatch::tbuf_ [private]

Buffer for times().

Definition at line 133 of file stopwatch.h.

Referenced by start(), and stop().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:13:14 2006 for OSB Library by  doxygen 1.4.7