NLMISC::CAutoTimer Class Reference

#include <hierarchical_timer.h>


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 475 of file hierarchical_timer.h.

Public Member Functions

 CAutoTimer (CHTimer *timer)
 ~CAutoTimer ()

Private Attributes

CHTimer_HTimer


Constructor & Destructor Documentation

NLMISC::CAutoTimer::CAutoTimer CHTimer timer  )  [inline]
 

Definition at line 480 of file hierarchical_timer.h.

References _HTimer, and NLMISC::CHTimer::before().

00480 : _HTimer(timer) { _HTimer->before(); }

NLMISC::CAutoTimer::~CAutoTimer  )  [inline]
 

Definition at line 481 of file hierarchical_timer.h.

References _HTimer, and NLMISC::CHTimer::after().

00481 { _HTimer->after(); }


Field Documentation

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

Definition at line 478 of file hierarchical_timer.h.

Referenced by CAutoTimer(), and ~CAutoTimer().


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 13:01:55 2004 for NeL by doxygen 1.3.6