JX Application Framework
|
#include <JStopWatch.h>
Public Member Functions | |
JStopWatch () | |
~JStopWatch () | |
void | StartTimer () |
void | StopTimer () |
JFloat | GetCPUTimeInterval () const |
JFloat | GetUserTimeInterval () const |
JString | PrintTimeInterval () const |
Class for timing an operation. Typical usage: #include "JStopWatch.h" ... JStopWatch timer; timer.StartTimer(); ... timer.StopTimer(); JString duration = timer.PrintTimeInterval(); This class was not designed to be a base class.
JStopWatch::JStopWatch | ( | ) |
JStopWatch::~JStopWatch | ( | ) |
JFloat JStopWatch::GetCPUTimeInterval | ( | ) | const |
Return the time interval in seconds from clock.
If we are still running, then we return the amount of time since we started.
JFloat JStopWatch::GetUserTimeInterval | ( | ) | const |
Return the time interval in seconds from time.
If we are still running, then we return the amount of time since we started.
JString JStopWatch::PrintTimeInterval | ( | ) | const |
Return the time interval as a text string: "<cpu time>; <user time>"
void JStopWatch::StartTimer | ( | ) |
void JStopWatch::StopTimer | ( | ) |