Called when we exit the block of code corresponding to this profile node
| 87 | |
| 88 | // Called when we exit the block of code corresponding to this profile node |
| 89 | bool 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 |
| 106 | void ProfileNode::reset() { |