Octane v1.01.20 - The Open Compression Toolkit for C++ http://octane.sourceforge.net/
Homepage | Main | Modules | Class Hierarchy | Compound List | File List | Compound Members | Related Pages

OctaneScopeTimer Class Reference
[Utility]

#include <scope_timer.hpp>

List of all members.


Detailed Description

Simple timer, measuring time from construction to destruction.

Definition at line 27 of file scope_timer.hpp.

Public Member Functions

 OctaneScopeTimer (const std::string _pre="< scope_timer >", const std::string _post="seconds\n", std::ostream &_to=std::cout)
 Constructor.

float get_elapsed ()
 Get the elapsed time since construction.

 ~OctaneScopeTimer ()
 Destructor.


Constructor & Destructor Documentation

OctaneScopeTimer::OctaneScopeTimer const std::string  _pre = "<scope_timer> ",
const std::string  _post = " seconds\n",
std::ostream &  _to = std::cout
[inline]
 

Constructor.

Parameters:
_pre - string to display before time.
_post - string to display after time.
_to - stream for output.

Definition at line 34 of file scope_timer.hpp.

00037        : pre(_pre), post(_post), to(_to)
00038     { ; }

OctaneScopeTimer::~OctaneScopeTimer  )  [inline]
 

Destructor.

Outputs the elapsed time along with the pre- and post messages.

Definition at line 46 of file scope_timer.hpp.

References OctaneTimer::stop().

00046 { to << pre << t.stop() << post; }


Member Function Documentation

float OctaneScopeTimer::get_elapsed  )  [inline]
 

Get the elapsed time since construction.

Returns:
elapsed time.

Definition at line 42 of file scope_timer.hpp.

References OctaneTimer::stop().

00042 { return t.stop(); }


The documentation for this class was generated from the following file:  
Generated on 20 May 2004 by doxygen 1.3.3