MULTIBODY SIMULATION SOFTWARE - API documentation

chrono::ChTimer< real_type > Class Template Reference

#include <CHtimer.h>

List of all members.

Public Member Functions

void start ()
void stop ()
real_type operator() () const


Detailed Description

template<typename real_type>
class chrono::ChTimer< real_type >

Class for high-resolution timer. This class can be used to get the execution time of fast algorithms, for example for profiling.

Based on http://www-106.ibm.com/developerworks/library/l-rt1/ and on the timer of the OpenTissue project ( (C) J.Sporring, K.Erleben)

How to use it:

ChTimer<double> timer;

timer.start(); ... timer.stop(); GetLog() << "It took " << timer() << " seconds to perform" << std::endl;


Member Function Documentation

template<typename real_type>
void chrono::ChTimer< real_type >::start (  ) 

Start the timer.

template<typename real_type>
void chrono::ChTimer< real_type >::stop (  ) 

Stops the timer.

template<typename real_type>
real_type chrono::ChTimer< real_type >::operator() (  )  const

Get the timer value, with the () operator.


CHRONO::ENGINE
C++ library for multibody simulation, (C) Alessandro Tasora
This API documentation has been generated on 17 Jul 2009 by Doxygen