Timer Class Reference

#include <TimeStamp.h>

List of all members.

Public Member Functions

 Timer (void)
 ~Timer ()
ostream & timeStamp (ostream &os)

Private Member Functions

 Timer (const Timer &)
Timeroperator= (const Timer &)

Private Attributes

int numStamps
clock_t firstStamp
clock_t lastStamp


Detailed Description

Definition at line 49 of file TimeStamp.h.


Constructor & Destructor Documentation

Timer::Timer ( void   ) 

Definition at line 47 of file TimeStamp.cpp.

00048 : numStamps( 0 ), firstStamp( clock() ), lastStamp( firstStamp )
00049 {
00050 }

Timer::~Timer (  ) 

Definition at line 52 of file TimeStamp.cpp.

00053 {
00054 }

Timer::Timer ( const Timer  )  [private]


Member Function Documentation

ostream & Timer::timeStamp ( ostream &  os  ) 

Definition at line 57 of file TimeStamp.cpp.

References firstStamp, lastStamp, and numStamps.

Referenced by operator<<().

00058 {
00059 
00060   clock_t now = clock();
00061 
00062   os << " Time stamp: "  << ++numStamps
00063      << "\t Since Start: " << now - firstStamp
00064      << "\t Since Last: "  << now - lastStamp << endl;
00065 
00066   lastStamp = now;
00067   return os;
00068 }

Here is the caller graph for this function:

Timer& Timer::operator= ( const Timer  )  [private]


Member Data Documentation

int Timer::numStamps [private]

Definition at line 103 of file TimeStamp.h.

Referenced by timeStamp().

clock_t Timer::firstStamp [private]

Definition at line 104 of file TimeStamp.h.

Referenced by timeStamp().

clock_t Timer::lastStamp [private]

Definition at line 105 of file TimeStamp.h.

Referenced by timeStamp().


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 13:22:55 2007 for ssaha by  doxygen 1.5.2