LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::timer Class Reference

The timer allows to measure time with a precision of about 30us on Linux systems and ??? on windows systems. More...

#include <ltiTimer.h>

Inheritance diagram for lti::timer:
Inheritance graph
[legend]
Collaboration diagram for lti::timer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 timer ()
void start ()
void stop ()
double getTime () const
virtual const char * getTypeName () const

Detailed Description

The timer allows to measure time with a precision of about 30us on Linux systems and ??? on windows systems.

The maximum time that can be measured with this function is 1 day (86.4E+09 microseconds). To measure longer time intervalls use the standard time() function.

Note that this function returns the Wall-Clock time and not the CPU-Time.

Example:

      lti::timer chron;

      chron.start();

      // do something

      chron.stop();

      std::cout << "something takes " << chron.getTime() << " microseconds\n";

Constructor & Destructor Documentation

lti::timer::timer (  ) 

default constructor


Member Function Documentation

double lti::timer::getTime (  )  const

get the elapsed time (in microsecond) between start() and stop() or the actual time (if stop() is not been called yet!)

Returns:
elapsed time
virtual const char* lti::timer::getTypeName (  )  const [virtual]

name of this type

Reimplemented from lti::object.

void lti::timer::start (  ) 

start the timer

void lti::timer::stop (  ) 

stop the timer


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

Generated on Sat Apr 10 15:28:53 2010 for LTI-Lib by Doxygen 1.6.1