We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f66447 commit 33b4d47Copy full SHA for 33b4d47
src/tree_node.cpp
@@ -106,13 +106,17 @@ NodeStatus TreeNode::executeTick()
106
if(!substituted)
107
{
108
using namespace std::chrono;
109
+
110
auto t1 = steady_clock::now();
111
+ std::shared_ptr<void> timer(nullptr, [&](...) {
112
+ auto t2 = steady_clock::now();
113
+ if(monitor_tick)
114
+ {
115
+ monitor_tick(*this, new_status, duration_cast<microseconds>(t2 - t1));
116
+ }
117
+ });
118
119
new_status = tick();
- auto t2 = steady_clock::now();
- if(monitor_tick)
- {
- monitor_tick(*this, new_status, duration_cast<microseconds>(t2 - t1));
- }
120
}
121
122
0 commit comments