Skip to content

Instantly share code, notes, and snippets.

@meribold
Last active August 29, 2015 14:23
Show Gist options
  • Save meribold/b71cfcf6f2d5887be4e4 to your computer and use it in GitHub Desktop.
Save meribold/b71cfcf6f2d5887be4e4 to your computer and use it in GitHub Desktop.
Macro for Warcraft that prints a chat message when any frame took more than 1/30 seconds to compute
/run local f=CreateFrame("Frame"); f:SetScript("OnUpdate",function(_,elapsed) if elapsed>1/30 then print("Lag: "..math.floor(elapsed*1000+.5).." ms, equivalent to "..math.floor(1/elapsed+.5).." FPS") end end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment