Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

PerformanceTimer Class Reference

#include <PerformanceTimer.h>

List of all members.

Public Member Functions

 PerformanceTimer ()
 ~PerformanceTimer ()
unsigned int getTime_usec ()
void printTime ()
void start (string procName)
void stop ()

Private Member Functions

 PerformanceTimer (const PerformanceTimer &)
PerformanceTimer operator= (const PerformanceTimer &)

Private Attributes

timeval startTime
timeval endTime
string processName
bool timerStopped


Detailed Description

Simple timer to record the time taken for methods or processes in the simulation.

Definition at line 36 of file PerformanceTimer.h.


Constructor & Destructor Documentation

PerformanceTimer::PerformanceTimer  ) 
 

Constructor

Definition at line 33 of file PerformanceTimer.cpp.

References endTime, startTime, and timerStopped.

PerformanceTimer::~PerformanceTimer  ) 
 

Destructor.

Definition at line 46 of file PerformanceTimer.cpp.

PerformanceTimer::PerformanceTimer const PerformanceTimer  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

unsigned int PerformanceTimer::getTime_usec  ) 
 

Returns how long since the timer was started in microseconds.

Definition at line 58 of file PerformanceTimer.cpp.

References endTime, startTime, and timerStopped.

PerformanceTimer PerformanceTimer::operator= const PerformanceTimer  )  [private]
 

Declare assignment private so it cannot be used.

void PerformanceTimer::printTime  ) 
 

Prints out the time since it started.

Definition at line 68 of file PerformanceTimer.cpp.

References endTime, processName, startTime, and timerStopped.

void PerformanceTimer::start string  procName  ) 
 

Starts the timer by recording the current time.

Definition at line 78 of file PerformanceTimer.cpp.

References endTime, processName, startTime, and timerStopped.

void PerformanceTimer::stop  ) 
 

Stops the timer.

Definition at line 87 of file PerformanceTimer.cpp.

References endTime, and timerStopped.


Member Data Documentation

timeval PerformanceTimer::endTime [private]
 

Time structures to record the start time.

Definition at line 53 of file PerformanceTimer.h.

Referenced by getTime_usec(), PerformanceTimer(), printTime(), start(), and stop().

string PerformanceTimer::processName [private]
 

Name of the process or method that is being timed.

Definition at line 56 of file PerformanceTimer.h.

Referenced by printTime(), and start().

timeval PerformanceTimer::startTime [private]
 

Time structures to record the start time.

Definition at line 50 of file PerformanceTimer.h.

Referenced by getTime_usec(), PerformanceTimer(), printTime(), and start().

bool PerformanceTimer::timerStopped [private]
 

When the timer is running this is set to false. Setting this to true stops the timer and end time is no longer updated.

Definition at line 60 of file PerformanceTimer.h.

Referenced by getTime_usec(), PerformanceTimer(), printTime(), start(), and stop().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:18:50 2007 for SpikeStream Library by  doxygen 1.4.4