#include <cascade/util/CascadeElapsedTime.h>
Inheritance diagram for CascadeElapsedTime:
Public Member Functions | |
CascadeElapsedTime () | |
virtual | ~CascadeElapsedTime () |
void | Start () |
void | Stop () |
void | Report (const char *pString=NULL) |
Protected Attributes | |
u64 | m_nMillisecondsStart |
u64 | m_nMillisecondsStop |
CascadeElapsedTime is a useful class for measuring the elapsed time (in seconds and milliseconds) of a section of code.
Example:
CascadeElapsedTime et; et.Start(); /* do some lengthy operation */ et.Stop(); et.Report("My lengthy operation took: ");
Output:
My lengthy operation took: 0.467 seconds.
|
constructs a CascadeElapsedTime object The CascadeElapsedTime constructor is lightweight. |
|
destructor This is the CascadeElapsedTime destructor. |
|
reports the elapsed time in seconds and milliseconds Report() reports the time elapsed between calls to Start() and Stop(). Report() must only be called after the elapsed time counter has been started and stopped.
|
|
starts the elapsed time counter Start() starts the elapsed time counter. After starting the elapsed time counter, call Stop() and then Report() |
|
stops the elapsed time counter Stop() stops the elapsed time counter. After stopping the elapsed time counter, call Report() to report the results. |
|
|
|
|