aboutsummaryrefslogtreecommitdiff
path: root/advtrains/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-12-05 10:14:07 +0100
committerorwell96 <orwell@bleipb.de>2019-12-05 10:15:36 +0100
commiteeef07d05a7e53de469f19a23fe1e69f569fc924 (patch)
tree6330ae717f337ec1a039004349d9c4c045ab632c /advtrains/init.lua
parent9c1d3565058799f21b6985c100ccf1abe045d3da (diff)
downloadadvtrains-eeef07d05a7e53de469f19a23fe1e69f569fc924.tar.gz
advtrains-eeef07d05a7e53de469f19a23fe1e69f569fc924.tar.bz2
advtrains-eeef07d05a7e53de469f19a23fe1e69f569fc924.zip
Add profiling instructions for advprofiler
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r--advtrains/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua
index c5604fd..0111b9c 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -19,6 +19,17 @@ AT_CMAX = 16
advtrains = {trains={}, player_to_train_mapping={}}
+-- Profiler boilerplate
+if advprofiler then
+ advtrains.profiler = advprofiler.new_profiler("advtrains")
+else
+ advtrains.profiler = {
+ count=function() end,
+ enter=function() end,
+ leave=function() end,
+ }
+end
+
--pcall
local no_action=false