Browse Source

fprofile works with multiuple return alues

master
Nicholas Hayashi 3 years ago
parent
commit
ab1b0b3e4f
  1. 4
      src/extra.lua

4
src/extra.lua

@ -1,9 +1,7 @@
-- @TODO make it work with functions that return multiple values
-- right now it discards returned values beyond the first
function fprofile(f, ...)
local t1 = am.current_time()
local result = f(...)
local result = { f(...) }
log("%f", am.current_time() - t1)
return result
end

Loading…
Cancel
Save