GetTickCount

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:44, 4 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getTickCount

Returns the number of monotonic milliseconds elapsed in the current runtime.

Syntax

int getTickCount()

Parameters

This function does not accept parameters.

Returns

Returns a monotonic timestamp in milliseconds as an integer.

Examples

Measure how long an operation takes:

local startedAt = getTickCount()
-- Do some work here.
outputDebugString("Elapsed: " .. (getTickCount() - startedAt) .. " ms")

Notes

  • Available in both client-side and server-side resource scripts.
  • Use this value for elapsed-time calculations, not as a wall-clock date or time.