Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::Time::ProfileTimer Class Reference

#include <ProfileTimer.h>

Public Member Functions

 ProfileTimer ()=default
 
void start () noexcept
 
void stop () noexcept
 
void reset () noexcept
 
string print (U32 level=0) const
 
U64 get () const
 
U64 getChildTotal () const
 
const stringname () const noexcept
 
void addChildTimer (ProfileTimer &child)
 
void removeChildTimer (ProfileTimer &child)
 
bool hasChildTimer (const ProfileTimer &child) const
 

Static Public Member Functions

static string printAll ()
 
static ProfileTimergetNewTimer (const char *timerName)
 
static void removeTimer (ProfileTimer &timer)
 
static U64 overhead ()
 

Protected Attributes

string _name = ""
 
U64 _timer = 0UL
 
U64 _timerAverage = 0UL
 
U32 _timerCounter = 0
 
U32 _globalIndex = 0
 
vector< U32_children
 
U32 _parent = Config::Profile::MAX_PROFILE_TIMERS + 1
 

Detailed Description

Definition at line 40 of file ProfileTimer.h.

Constructor & Destructor Documentation

◆ ProfileTimer()

Divide::Time::ProfileTimer::ProfileTimer ( )
default

Member Function Documentation

◆ addChildTimer()

void Divide::Time::ProfileTimer::addChildTimer ( ProfileTimer child)

Definition at line 47 of file ProfileTimer.cpp.

◆ get()

U64 Divide::Time::ProfileTimer::get ( ) const
inline

Definition at line 38 of file ProfileTimer.inl.

◆ getChildTotal()

U64 Divide::Time::ProfileTimer::getChildTotal ( ) const

Definition at line 73 of file ProfileTimer.cpp.

◆ getNewTimer()

ProfileTimer & Divide::Time::ProfileTimer::getNewTimer ( const char *  timerName)
static

Definition at line 145 of file ProfileTimer.cpp.

◆ hasChildTimer()

bool Divide::Time::ProfileTimer::hasChildTimer ( const ProfileTimer child) const

Definition at line 64 of file ProfileTimer.cpp.

◆ name()

const string & Divide::Time::ProfileTimer::name ( ) const
inlinenoexcept

Definition at line 47 of file ProfileTimer.inl.

◆ overhead()

U64 Divide::Time::ProfileTimer::overhead ( )
static

Definition at line 107 of file ProfileTimer.cpp.

◆ print()

string Divide::Time::ProfileTimer::print ( U32  level = 0) const

Definition at line 87 of file ProfileTimer.cpp.

◆ printAll()

string Divide::Time::ProfileTimer::printAll ( )
static

Definition at line 124 of file ProfileTimer.cpp.

◆ removeChildTimer()

void Divide::Time::ProfileTimer::removeChildTimer ( ProfileTimer child)

Definition at line 58 of file ProfileTimer.cpp.

◆ removeTimer()

void Divide::Time::ProfileTimer::removeTimer ( ProfileTimer timer)
static

Definition at line 174 of file ProfileTimer.cpp.

◆ reset()

void Divide::Time::ProfileTimer::reset ( )
noexcept

Definition at line 41 of file ProfileTimer.cpp.

◆ start()

void Divide::Time::ProfileTimer::start ( )
noexcept

Definition at line 30 of file ProfileTimer.cpp.

◆ stop()

void Divide::Time::ProfileTimer::stop ( )
noexcept

Definition at line 35 of file ProfileTimer.cpp.

Member Data Documentation

◆ _children

vector<U32> Divide::Time::ProfileTimer::_children
protected

Definition at line 75 of file ProfileTimer.h.

◆ _globalIndex

U32 Divide::Time::ProfileTimer::_globalIndex = 0
protected

Definition at line 65 of file ProfileTimer.h.

◆ _name

string Divide::Time::ProfileTimer::_name = ""
protected

Definition at line 61 of file ProfileTimer.h.

◆ _parent

U32 Divide::Time::ProfileTimer::_parent = Config::Profile::MAX_PROFILE_TIMERS + 1
protected

Definition at line 76 of file ProfileTimer.h.

◆ _timer

U64 Divide::Time::ProfileTimer::_timer = 0UL
protected

Definition at line 62 of file ProfileTimer.h.

◆ _timerAverage

U64 Divide::Time::ProfileTimer::_timerAverage = 0UL
protected

Definition at line 63 of file ProfileTimer.h.

◆ _timerCounter

U32 Divide::Time::ProfileTimer::_timerCounter = 0
protected

Definition at line 64 of file ProfileTimer.h.


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