MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / exitBlockOfCode

Method exitBlockOfCode

src/utils/Profiler.cpp:89–103  ·  view source on GitHub ↗

Called when we exit the block of code corresponding to this profile node

Source from the content-addressed store, hash-verified

87
88// Called when we exit the block of code corresponding to this profile node
89bool ProfileNode::exitBlockOfCode() {
90 mRecursionCounter--;
91
92 if (mRecursionCounter == 0 && mNbTotalCalls != 0) {
93
94 // Get the current system time
95 std::chrono::time_point<std::chrono::high_resolution_clock> currentTime = std::chrono::high_resolution_clock::now();
96
97 // Increase the total elasped time in the current block of code
98 mTotalTime += currentTime - mStartingTime;
99 }
100
101 // Return true if the current code is not recursing
102 return (mRecursionCounter == 0);
103}
104
105// Reset the profiling of the node
106void ProfileNode::reset() {

Callers 1

stopProfilingBlockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected