To handle elapsed time counting. More...
#include <Timer.h>
Public Member Functions | |
| Timer () | |
| Default constructor. | |
| ~Timer () | |
| Destructor. | |
| bool | Started () const |
| Say if time counter has started. | |
| void | Start () |
| Start (or resume) time counting. | |
| void | Stop () |
| Stop time counting. | |
| void | Clear () |
| Clear time value (Set to zero) | |
| real_t | get () const |
| Return elapsed time (in seconds) | |
| real_t | getTime () const |
| Return elapsed time (in seconds) | |
To handle elapsed time counting.
This class is to be used when testing program performances. A normal usage of the class is, once an instance is constructed, to use alternatively, Start, Stop and Resume. Elapsed time can be obtained once the member function Stop is called.
| real_t getTime | ( | ) | const |
Return elapsed time (in seconds)
Identical to get
| void Start | ( | ) |
Start (or resume) time counting.
This member function is to be used to start or resume time counting
| bool Started | ( | ) | const |
Say if time counter has started.
Return true if time has started, false if not
| void Stop | ( | ) |
Stop time counting.
This function interrupts time counting. This one can be resumed by the function Start