ACG::TimedTracing Class Reference

#include <ACG/Utils/Tracing.hh>

Inheritance diagram for ACG::TimedTracing:
Inheritance graph
[legend]
Collaboration diagram for ACG::TimedTracing:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TimedTracing (const std::string &_text, std::ostream &_os=std::cerr)
 default constructor
 ~TimedTracing ()
 destructor

Private Attributes

StopWatch timer_

Detailed Description

This class is similar to ACG::Tracing. It just starts a timer at the start of the process to be traced and outputs the time the computation took when leaving the block. Again we provide some convenience macros.

    { // start a new block
      ACG_TIMES_TRACE("What's the meaning of like?");

      for (years=0; years <= ACG::NumLimitsT<int>::max(); ++years)
      {
        // ... lengthy computation, show some progress
        ACG_TRACE_PROGRESS;
      }

      std::cout << "42";

    } // leaving the block will display " <...> secs, finished\n"

If you want to trace only one command you can also use:

    ACG_TIMED_TRACE_CMD("What's the meaning of like?", calc_meaning_of_life());
See also:
TimedTracing

Definition at line 181 of file Tracing.hh.


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

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .