NetworkClient

getTimeDifference

GET_TIME_DIFFERENCE0xA2C6FC031D46FFF0

The GTA V native GET_TIME_DIFFERENCE of the NETWORK namespace, as LS:MP client scripts call it: the global function getTimeDifference, in JavaScript and in Lua.

SignatureJavaScript
getTimeDifference(timeA: number, timeB: number): number
SignatureLua
getTimeDifference(timeA: integer, timeB: integer): integer

Usage

JavaScript
const result = getTimeDifference(timeA, timeB);
Lua
local result = getTimeDifference(timeA, timeB)

Parameters

ParameterTypeJavaScriptLua
timeAintnumberinteger
timeBintnumberinteger

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Subtracts the second argument from the first.

Reference

Namespace
Network NETWORK
In the game
int GET_TIME_DIFFERENCE(int timeA, int timeB)
Hash
0xA2C6FC031D46FFF0

Open in the interactive natives reference