WoW:API GetFramerate: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
((Completes previous edit))
Line 1: Line 1:
<center>'''GetFramerate''' '' - Documentation by Anti-Gremlin-''</center>
Retrieve the current framerate (frames / second).


Retrieve the current Framerate (FPS)
local framerate = GetFramerate();
 
framerate = GetFramerate();


----
----
Line 13: Line 11:
;''Returns''
;''Returns''


:;freamrate : The current frames per second.
:;framerate : Float - The current framerate in frames per second.
----
----
;''Example''
;''Example''
  -- Get the FrameRate from the Client<br />
   local framerate = GetFramerate();
   local framerate = GetFramerate();<br />
   message("Your current FPS is " .. floor(framerate) .. "fps.");
   if(framerate >= 30) then<br />
    message( "Great FPS!" );<br />
  elseif( framerate < 30 and framerate > 10 ) then<br />
    message( "Average FPS..." );<br />
  elseif( framerate <= 10 ) then<br />
    message( "Bad FPS!!!!" );<br />
  end
 
;''Result''
;''Result''


Message box appears with what kind of FPS you have.
Displays the current framerate in a message box.


----
----
;''Description''
;''Description''


: Retrieve the current framerate of your system
: Returns the current framerate.


----
----
{{WoW API}}
{{WoW API}}

Revision as of 13:34, 11 June 2006

Retrieve the current framerate (frames / second).

local framerate = GetFramerate();

Arguments
none

Returns
framerate
Float - The current framerate in frames per second.

Example
 local framerate = GetFramerate();
 message("Your current FPS is " .. floor(framerate) .. "fps.");
Result

Displays the current framerate in a message box.


Description
Returns the current framerate.

Template:WoW API