#include <GTimer.h>
Public Member Functions | |
| GTimer () | |
| Constructor. | |
| ~GTimer () | |
| Destructor. | |
| void | start () |
| Starts the timer. | |
| void | stop () |
| Stops the timer. | |
| void | reset () |
| resets the timer without stopping it | |
| double | operator() () const |
| returns the time in seconds elapsed since the start | |
| bool | is_active () const |
| returns true if the timer is active | |
Private Attributes | |
| struct timeval | _start |
| start time of the timer | |
| struct timeval | _end |
| stop time of the timer | |
| bool | active |
| flags saying if the timer is active or not | |
This class implemets a timer. It is mainly used internally by the RunState objects.
1.5.5