Skip to content

Instantly share code, notes, and snippets.

@EngineerSmith
Created March 22, 2022 18:53
Show Gist options
  • Save EngineerSmith/0ec18853fad85848d2de7c59fe0a2596 to your computer and use it in GitHub Desktop.
Save EngineerSmith/0ec18853fad85848d2de7c59fe0a2596 to your computer and use it in GitHub Desktop.
local timer = 0
local sinCounter
function love.update(dt)
timer = timer + dt
sinCounter = appleCake.counter("sin", {sin=math.sin(timer)}, sinCounter)
if timer > 0.1 then
appleCake.counter("memory", {memory=collectgarbage("count")})
timer = 0
end
-- These could be optimized to use the same arg table as well
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment