Skip to content

Instantly share code, notes, and snippets.

@EngineerSmith
Created February 7, 2020 18:32
Show Gist options
  • Save EngineerSmith/90e60beefaac8efc43e0b7d3a74fc50d to your computer and use it in GitHub Desktop.
Save EngineerSmith/90e60beefaac8efc43e0b7d3a74fc50d to your computer and use it in GitHub Desktop.
local function bar() -- [email protected]#1
local _profileBar = appleCake.profileFunc({}) -- Initalizing args to an empty table as it's nil by default
--...
_profileBar.args.value = 12
--...
_profileBar:stop()
end
local _profile --Example of reusing profiles to save creating garbage, recommended
local function foo() -- [email protected]#10
_profile = appleCake.profileFunc({num=5}, _profile) --(nil, _profile), if you didn't have any args
--...
_profile.args["bar - 2"] = bar - 2
_profile:stop()
end
(function() -- 0x76c73c@profileFunc#17
local p = appleCake.profileFunc()
love.timer.sleep(0.1)
p:stop()
end)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment