latest version v1.9 - last update 10 Apr 2010 |
The timer allows to measure time with a precision of about 30us on Linux systems and ??? on windows systems. More...
#include <ltiTimer.h>
Public Member Functions | |
timer () | |
void | start () |
void | stop () |
double | getTime () const |
virtual const char * | getTypeName () const |
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";
lti::timer::timer | ( | ) |
default constructor
double lti::timer::getTime | ( | ) | const |
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