ClockClient

getClockSeconds

GET_CLOCK_SECONDS0x494E97C2EF27C470

The GTA V native GET_CLOCK_SECONDS of the CLOCK namespace, as LS:MP client scripts call it: the global function getClockSeconds, in JavaScript and in Lua.

SignatureJavaScript
getClockSeconds(): number
SignatureLua
getClockSeconds(): integer

Usage

JavaScript
const result = getClockSeconds();
Lua
local result = getClockSeconds()

Parameters

None.

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.

Gets the current ingame clock second. Note that ingame clock seconds change really fast since a day in GTA is only 48 minutes in real life.

Reference

Namespace
Clock CLOCK
In the game
int GET_CLOCK_SECONDS()
Hash
0x494E97C2EF27C470

Open in the interactive natives reference