LAMA
lama::Timer Class Reference

A simple timer interface, offering a few, common timer operations. More...

#include <Timer.hpp>

Inheritance diagram for lama::Timer:

Public Member Functions

 Timer ()
 Constructor.
virtual ~Timer ()
 Destructor.
virtual void start (const std::string &timerId)=0
 Starts or resumes the timer.
virtual void stop (const std::string &timerId)=0
 Stops the timer and stores time measured time internally.
virtual double getTime (const std::string &timerId)=0
 Gets the elapsed time since the last reset.
virtual void stopAndReset (const std::string &timerId)=0
 Stops and resets the timer.

Detailed Description

A simple timer interface, offering a few, common timer operations.


Constructor & Destructor Documentation

Constructor.

lama::Timer::~Timer ( ) [virtual]

Destructor.


Member Function Documentation

virtual double lama::Timer::getTime ( const std::string &  timerId) [pure virtual]

Gets the elapsed time since the last reset.

Parameters:
[in]timerIdthe ID of the timer
Returns:
Time measured in seconds

Implemented in lama::OpenMPTimer.

virtual void lama::Timer::start ( const std::string &  timerId) [pure virtual]

Starts or resumes the timer.

Parameters:
[in]timerIdthe ID of the timer

Implemented in lama::OpenMPTimer.

virtual void lama::Timer::stop ( const std::string &  timerId) [pure virtual]

Stops the timer and stores time measured time internally.

Measurement may be resumed by calling start()

Parameters:
[in]timerIdthe ID of the timer
Returns:
Time measured in seconds

Implemented in lama::OpenMPTimer.

virtual void lama::Timer::stopAndReset ( const std::string &  timerId) [pure virtual]

Stops and resets the timer.

Parameters:
[in]timerIdthe ID of the timer
Returns:
Time measured in seconds

Implemented in lama::OpenMPTimer.


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