Gameplay::getFrameTime

From RAGE Multiplayer Wiki
Revision as of 09:52, 29 April 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| Gets the time since the last frame ===Return value=== *''' {{RageType|float}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.gameplay.getFrameTime(); </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> const frameTime = mp.game.gameplay.getFrameTime(); mp.console.logInfo(`Frame time is ${frameTime}`); </syntaxhighlight> }} ==See also== {{Gameplay_definition_c}} Category:Clientside API Category:TO...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Gets the time since the last frame

Return value

  • float

Syntax

mp.game.gameplay.getFrameTime();

Example

const frameTime = mp.game.gameplay.getFrameTime();
mp.console.logInfo(`Frame time is ${frameTime}`);


See also