aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/profiler/instrumentation.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/profiler/instrumentation.lua b/builtin/profiler/instrumentation.lua
index 6b951a2c2..f80314b32 100644
--- a/builtin/profiler/instrumentation.lua
+++ b/builtin/profiler/instrumentation.lua
@@ -102,8 +102,9 @@ local function instrument(def)
-- also called https://en.wikipedia.org/wiki/Continuation_passing_style
-- Compared to table creation and unpacking it won't lose `nil` returns
-- and is expected to be faster
- -- `measure` will be executed after time() and func(...)
- return measure(modname, instrument_name, time(), func(...))
+ -- `measure` will be executed after func(...)
+ local start = time()
+ return measure(modname, instrument_name, start, func(...))
end
end