| Support Forum G3D Web Page |
Provides accurate measurement of sequences of durations. More...
Public Member Functions | |
| ContinuousStopwatch (const String &name="Stopwatch", bool enabled=false) | |
| bool | enabled () const |
| const RealTime | getElapsedTime () |
| Get elapsed time since previous marker and start of sequence. More... | |
| void | printElapsedTime (const String &marker=String()) |
| Prints the elapsed time since previous marker and start of sequence. More... | |
| void | restart () |
| Restarts the stopwatch with a new starting time. More... | |
| void | setEnabled (bool enabled) |
| Set whether printElapsedTime output is enabled. More... | |
Provides accurate measurement of sequences of durations.
Example: For profiling sequences of code
ContinousStopwatch sw("My Stopwatch", true);
slowOperation();
sw.printElapsedTime("slowOperation");
kdTree.balance();
sw.printElapsedTime("Balance tree");
| G3D::ContinuousStopwatch::ContinuousStopwatch | ( | const String & | name = "Stopwatch", |
| bool | enabled = false |
||
| ) |
|
inline |
Referenced by G3D::Stopwatch::enabled(), and setEnabled().
| const RealTime G3D::ContinuousStopwatch::getElapsedTime | ( | ) |
Get elapsed time since previous marker and start of sequence.
Prints the elapsed time since previous marker and start of sequence.
Referenced by G3D::Stopwatch::printElapsedTime().
| void G3D::ContinuousStopwatch::restart | ( | ) |
Restarts the stopwatch with a new starting time.
Referenced by G3D::Stopwatch::reset().
|
inline |
Set whether printElapsedTime output is enabled.
Referenced by G3D::Stopwatch::setEnabled().
1.8.15