Public Methods | |
| Chronograph () | |
| Creates a Chronograph. | |
| void | clear () |
| Clear (reset) the Chronograph. | |
| void | start () |
| Start measuring time. | |
| void | stop () |
| Stop measuring time. | |
| word32 | elapsedTimeInMillis () |
| Get the accumulated time in milliseconds. | |
| double | elapsedTimeInSec () |
| Get the accumulated time in seconds. | |
Example:
Chronograph c;
c.start();
for(int i=0; i<10000; ++i) { / * do stuff * / }
c.stop();
cout << "Spent = " << c.elapsedTimeInSec() << " seconds" << endl;
|
|
Creates a Chronograph. The time measurement is not started yet. You must call start() once to start the chronograph. |
|
|
Clear (reset) the Chronograph. The accumulated elapsed time is lost, and you have to call start() again to start measuring again |
|
|
Get the accumulated time in milliseconds. This method can be called either 'during measurement' (between a start() and a stop() ), or 'post morten' (after a stop() ).
|
|
|
Get the accumulated time in seconds.
|
|
|
Start measuring time.
|
|
|
Stop measuring time. The time elapsed between the last call to start() and this call is accumulated in the chronograph
|
1.3-rc2