Gameplay::startPerformanceTimer
Not available on SYNC MP yet
This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Client-side JavaScript). Calling it does nothing or throws.
JavaScript
Required Params
- None
Instance
PerformanceTimer {
getElapsedSec(): number;
getElapsedMs(): number;
getElapsedUs(): number;
reset(): void;
}
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()}`);