The Joe Engine
Joe's engine programming playground
JoeEngine::ScopedTimer< T > Class Template Reference

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...
 

Detailed Description

template<typename T>
class JoeEngine::ScopedTimer< T >

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)
}

Constructor & Destructor Documentation

◆ ScopedTimer() [1/2]

template<typename T >
JoeEngine::ScopedTimer< T >::ScopedTimer ( )
delete

Default constructor.

Deleted.

◆ ScopedTimer() [2/2]

template<typename T >
JoeEngine::ScopedTimer< T >::ScopedTimer ( const std::string &  endMsg,
const std::string &  startMsg = "" 
)
inline

Constructor.

Prints the start message and initializes the start time member.

◆ ~ScopedTimer()

template<typename T >
JoeEngine::ScopedTimer< T >::~ScopedTimer ( )
inline

Destructor.

Calculates the elapsed time since construction and prints the end message.


The documentation for this class was generated from the following file: