MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / reset

Method reset

Engine/source/platform/profiler.cpp:220–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220void Profiler::reset()
221{
222 mEnabled = false; // in case we're in a profiler call.
223 ProfilerData * head = mProfileList;
224 ProfilerData * curr = head;
225
226 while ( curr )
227 {
228 head = curr->mNextProfilerData;
229 free( curr );
230
231 if ( head )
232 curr = head;
233 else
234 curr = NULL;
235 }
236
237 mProfileList = NULL;
238
239 for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot)
240 {
241 walk->mFirstProfilerData = 0;
242 walk->mTotalTime = 0;
243 walk->mSubTime = 0;
244 walk->mTotalInvokeCount = 0;
245 }
246 mCurrentProfilerData = mRootProfilerData;
247 mCurrentProfilerData->mNextForRoot = 0;
248 mCurrentProfilerData->mFirstChild = 0;
249 for(U32 i = 0; i < ProfilerData::HashTableSize; i++)
250 mCurrentProfilerData->mChildHash[i] = 0;
251 mCurrentProfilerData->mInvokeCount = 0;
252 mCurrentProfilerData->mTotalTime = 0;
253 mCurrentProfilerData->mSubTime = 0;
254 mCurrentProfilerData->mSubDepth = 0;
255 mCurrentProfilerData->mLastSeenProfiler = 0;
256}
257
258static Profiler aProfiler; // allocate the global profiler
259

Callers 2

profiler.cppFile · 0.45
_updateTimeMethod · 0.45

Calls 1

freeFunction · 0.85

Tested by

no test coverage detected