MCPcopy Create free account
hub / github.com/DmitriBogdanov/UTL / recursive

Function recursive

examples/module_profiler/profiling_recursion.cpp:3–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "include/UTL/profiler.hpp"
2
3void recursive(int depth = 0) {
4 if (depth > 4) {
5 std::this_thread::sleep_for(std::chrono::milliseconds(50));
6 return;
7 }
8
9 UTL_PROFILER("1st recursion branch") recursive(depth + 1);
10 UTL_PROFILER("2nd recursion branch") recursive(depth + 2);
11}
12
13int main() {
14 recursive();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected