# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CAutoTimer Class Reference

An automatic measuring timer. More...

#include <hierarchical_timer.h>

List of all members.

Public Methods

 CAutoTimer (CHTimer *timer, bool displayAfter=false)
 ~CAutoTimer ()

Private Attributes

CHTimer_HTimer
bool _DisplayAfter


Detailed Description

An automatic measuring timer.

Encapsulates calls to CHTimer, and avoids missuses of before() and after(). ex:

 void myFunction()
 {
        static CHTimer  myTimer("myFunction");
        CAutoTimer              myAuto(myTimer);
        // some code here
 }
 *
Don't forget to call after() to avoid timing wrongness or assertion crashes !
Author:
Benjamin Legros , Nevrax France
Date:
2001

Definition at line 459 of file hierarchical_timer.h.


Constructor & Destructor Documentation

NLMISC::CAutoTimer::CAutoTimer CHTimer   timer,
bool    displayAfter = false
[inline]
 

Definition at line 465 of file hierarchical_timer.h.

References _DisplayAfter.

NLMISC::CAutoTimer::~CAutoTimer   [inline]
 

Definition at line 466 of file hierarchical_timer.h.

References _DisplayAfter.


Member Data Documentation

bool NLMISC::CAutoTimer::_DisplayAfter [private]
 

Definition at line 463 of file hierarchical_timer.h.

Referenced by CAutoTimer, and ~CAutoTimer.

CHTimer* NLMISC::CAutoTimer::_HTimer [private]
 

Definition at line 462 of file hierarchical_timer.h.


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