File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -106,19 +106,13 @@ NodeStatus TreeNode::executeTick()
106106 if (!substituted)
107107 {
108108 using namespace std ::chrono;
109-
110- auto t1 = steady_clock::now ();
111- // trick to prevent the compile from reordering the order of execution. See #861
112- // This makes sure that the code is executed at the end of this scope
113- std::shared_ptr<void > execute_later (nullptr , [&](...) {
114- auto t2 = steady_clock::now ();
115- if (monitor_tick)
116- {
117- monitor_tick (*this , new_status, duration_cast<microseconds>(t2 - t1));
118- }
119- });
120-
109+ const auto t1 = steady_clock::now ();
121110 new_status = tick ();
111+ const auto t2 = steady_clock::now ();
112+ if (monitor_tick)
113+ {
114+ monitor_tick (*this , new_status, duration_cast<microseconds>(t2 - t1));
115+ }
122116 }
123117 }
124118
You can’t perform that action at this time.
0 commit comments