/*********************************************************************************************** * CProfileManager::Get_Time_Since_Reset -- returns the elapsed time since last reset * *=============================================================================================*/ float CProfileManager::Get_Time_Since_Reset( void ) { dtEntity::Timer_t time; Profile_Get_Ticks(&time); time -= ResetTime; return (float)time / Profile_Get_Tick_Rate(); }
/*********************************************************************************************** * CProfileManager::Get_Time_Since_Reset -- returns the elapsed time since last reset * *=============================================================================================*/ float CProfileManager::Get_Time_Since_Reset( void ) { unsigned long int time; Profile_Get_Ticks(&time); time -= ResetTime; return (float)time / Profile_Get_Tick_Rate(); }
void CProfileNode::Call( void ) { TotalCalls++; if (RecursionCounter++ == 0) { Profile_Get_Ticks(&StartTime); } }
/*********************************************************************************************** * CProfileManager::Reset -- Reset the contents of the profiling system * * * * This resets everything except for the tree structure. All of the timing data is reset. * *=============================================================================================*/ void CProfileManager::Reset( void ) { Root.Reset(); Root.Call(); FrameCounter = 0; Profile_Get_Ticks(&ResetTime); }
/*********************************************************************************************** * CProfileManager::Reset -- Reset the contents of the profiling system * * * * This resets everything except for the tree structure. All of the timing data is reset. * *=============================================================================================*/ void CProfileManager::Reset( void ) { if(!m_profilerEnabled) return; gProfileClock.reset(); Root.Reset(); Root.Call(); FrameCounter = 0; Profile_Get_Ticks(&ResetTime); }
bool CProfileNode::Return( void ) { if ( --RecursionCounter == 0 && TotalCalls != 0 ) { unsigned long int time; Profile_Get_Ticks(&time); time-=StartTime; TotalTime += (float)time / Profile_Get_Tick_Rate(); } return ( RecursionCounter == 0 ); }
/*********************************************************************************************** * CProfileManager::Reset -- Reset the contents of the profiling system * * * * This resets everything except for the tree structure. All of the timing data is reset. * *=============================================================================================*/ void CProfileManager::Reset( void ) { gProfileClock.reset(); int threadIndex = btQuickprofGetCurrentThreadIndex2(); if (threadIndex<0) return; gRoots[threadIndex].Reset(); gRoots[threadIndex].Call(); FrameCounter = 0; Profile_Get_Ticks(&ResetTime); }
/*********************************************************************************************** * CProfileManager::Reset -- Reset the contents of the profiling system * * * * This resets everything except for the tree structure. All of the timing data is reset. * *=============================================================================================*/ void CProfileManager::Reset( void ) { gProfileClock.reset(); int threadIndex = btQuickprofGetCurrentThreadIndex2(); if ((threadIndex<0) || threadIndex >= BT_QUICKPROF_MAX_THREAD_COUNT) return; gRoots[threadIndex].Reset(); gRoots[threadIndex].Call(); FrameCounter = 0; Profile_Get_Ticks(&ResetTime); }
bool CProfileNode::Return( void ) { if ( --RecursionCounter == 0 && TotalCalls != 0 ) { __int64 time; Profile_Get_Ticks(&time); time-=StartTime; float fTime = (float)time / Profile_Get_Tick_Rate(); TotalTime += fTime; if(fTime > MaxTime)MaxTime = fTime; if(fTime < MinTime) { MinTime = fTime; //char sz[256]; //sprintf(sz,"%f\n",MinTime); //OutputDebugString(sz); } } return ( RecursionCounter == 0 ); }