ESOUI SVN ZAMStats

[/] [trunk/] [ZAM_Stats/] [Modules/] [fps.lua] - Rev 2

Compare with Previous | Blame | View Log

local mathfloor = math.floor
local GetFramerate = GetFramerate
local timelastrun = 0


local module, text = ZAM_Stats:CreateModule("FPS")


CALLBACK_MANAGER:RegisterCallback("ZAM_Stats_Modules_Ready", function()

        text:SetHandler("OnUpdate", function(self, timerun)
                        if (timerun - timelastrun) >= 1 then
                                local fps = mathfloor(GetFramerate())
                                ZAM_Stats:SetModuleText(text, fps, " fps")
                                timelastrun = timerun
                        end
                end)

end)

Compare with Previous | Blame