Gameplay::startPerformanceTimer

From RAGE Multiplayer Wiki
Revision as of 23:59, 26 December 2025 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| ===Required Params=== *None ===Return value=== *'''{{RageType|PerformanceTimer}}''' — A performance timer instance. ==Syntax== <syntaxhighlight lang="javascript"> mp.game.misc.startPerformanceTimer() </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> const timer = mp.game.misc.startPerformanceTimer(); // some heavy logic here mp.gui.chat.push(`Elapsed ms: ${timer.getElapsedMs()}`); </syntaxhighlight> }} ==S...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Required Params

  • None

Return value

  • 'PerformanceTimer' — A performance timer instance.

Syntax

mp.game.misc.startPerformanceTimer()

Example

const timer = mp.game.misc.startPerformanceTimer();

// some heavy logic here

mp.gui.chat.push(`Elapsed ms: ${timer.getElapsedMs()}`);


See also