mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Use defined evaluation order in profiler
See https://github.com/LuaJIT/LuaJIT/issues/238
This commit is contained in:
parent
49f7d2494c
commit
1b664dd870
@ -102,8 +102,9 @@ local function instrument(def)
|
|||||||
-- also called https://en.wikipedia.org/wiki/Continuation_passing_style
|
-- also called https://en.wikipedia.org/wiki/Continuation_passing_style
|
||||||
-- Compared to table creation and unpacking it won't lose `nil` returns
|
-- Compared to table creation and unpacking it won't lose `nil` returns
|
||||||
-- and is expected to be faster
|
-- and is expected to be faster
|
||||||
-- `measure` will be executed after time() and func(...)
|
-- `measure` will be executed after func(...)
|
||||||
return measure(modname, instrument_name, time(), func(...))
|
local start = time()
|
||||||
|
return measure(modname, instrument_name, start, func(...))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user