#include <timer.h>
Public Member Functions | |
Timer () | |
Default constructor. | |
Timer (bool bStart) | |
Constructor that starts timer when called. | |
void | start () |
Starts timer. | |
double | stop () |
Stops timer and returns elapsed time. | |
double | getElapsedTime () |
Returns elapsed time. | |
Private Attributes | |
bool | bStart |
boolean allows it to start | |
timeval | _start |
start & stop time | |
timeval | _stop |
Timer::Timer | ( | ) |
Default constructor.
Timer::Timer | ( | bool | bStart | ) |
Constructor that starts timer when called.
[in] | bStart | when this is true, then time is started when constructor is called |
double Timer::getElapsedTime | ( | ) |
Returns elapsed time.
void Timer::start | ( | ) |
Starts timer.
double Timer::stop | ( | ) |
Stops timer and returns elapsed time.
timeval Timer::_start [private] |
start & stop time
timeval Timer::_stop [private] |
bool Timer::bStart [private] |
boolean allows it to start