Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(upgraded deprecated template)
mNo edit summary
Line 25: Line 25:
   
 
: Returns the current framerate.
 
: Returns the current framerate.
  +
  +
  +
: You can also see the same framerate in the WorldFrame with the keybind, Toggle Framerate Display (usually Control - R) where the FPS indicator can appear in the bottom-middle of the screen. You can also see the same framerate in the tooltip of the GameMenu button on the main actionbar.
  +
  +
  +
: Notice the framerate displayed here adjusts slowly when the FPS quickly drops from 60 to 6, for example. If the FPS drops very fast, this function will be decreasing to 40, 20, 15, etc, for the next couple seconds until it reaches 6. This delay means it is not as accurate as third party FPS programs, but still functional. Alternatively, no delay is seen when the FPS is increased quickly.

Revision as of 23:55, 25 April 2009

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.


You can also see the same framerate in the WorldFrame with the keybind, Toggle Framerate Display (usually Control - R) where the FPS indicator can appear in the bottom-middle of the screen. You can also see the same framerate in the tooltip of the GameMenu button on the main actionbar.


Notice the framerate displayed here adjusts slowly when the FPS quickly drops from 60 to 6, for example. If the FPS drops very fast, this function will be decreasing to 40, 20, 15, etc, for the next couple seconds until it reaches 6. This delay means it is not as accurate as third party FPS programs, but still functional. Alternatively, no delay is seen when the FPS is increased quickly.