Created
February 7, 2020 18:32
-
-
Save EngineerSmith/90e60beefaac8efc43e0b7d3a74fc50d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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