From eeef07d05a7e53de469f19a23fe1e69f569fc924 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 5 Dec 2019 10:14:07 +0100 Subject: Add profiling instructions for advprofiler --- advtrains_luaautomation/active_common.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'advtrains_luaautomation/active_common.lua') diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua index c17c6e9..4337122 100644 --- a/advtrains_luaautomation/active_common.lua +++ b/advtrains_luaautomation/active_common.lua @@ -114,6 +114,8 @@ function ac.run_in_env(pos, evtdata, customfct_p) return false end + atlatc.profiler:enter("ac_run_in_env") + local customfct=customfct_p or {} -- add interrupt function customfct.interrupt=function(t, imesg) @@ -152,6 +154,7 @@ function ac.run_in_env(pos, evtdata, customfct_p) if meta then meta:set_string("formspec", ac.getform(pos, meta)) end + atlatc.profiler:leave("ac_run_in_env") end function ac.on_digiline_receive(pos, node, channel, msg) -- cgit v1.2.3