#include <tnt_stopwatch.h>
Public Methods | |
| Stopwatch () | |
| void | start () |
| double | stop () |
| double | read () |
| void | resume () |
| int | running () |
Stopwatch Q;
Q.start;
{code to benchmark}
Q.stop;
double time_elapsed = Q.read();
|
|
Create an instance of a Stopwatch, with its own internal counter. |
|
|
Read current time, in seconds. (NOTE: Does NOT stop timing.) |
|
|
Resume timing, if currently stopped. Operation has no effect if Stopwatch is already running. |
|
|
|
|
|
Start timing from 0.00. |
|
|
Stop timing and return elapsed time (in seconds). |
1.2.5 written by Dimitri van Heesch,
© 1997-2001