The Joe Engine
Joe's engine programming playground
|
The ScopedTimer class. More...
#include <ScopedTimer.h>
Public Member Functions | |
ScopedTimer ()=delete | |
Default constructor. More... | |
ScopedTimer (const std::string &endMsg, const std::string &startMsg="") | |
Constructor. More... | |
~ScopedTimer () | |
Destructor. More... | |
The ScopedTimer class.
Class dedicated to finding the elapsed time of a segment of code. It is meant to be used as follows, using temporary scopes:
{
ScopedTimer<float> timer;
(code to profile)
}
|
delete |
Default constructor.
Deleted.
|
inline |
Constructor.
Prints the start message and initializes the start time member.
|
inline |
Destructor.
Calculates the elapsed time since construction and prints the end message.