GetMinuteDuration

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 09:52, 15 August 2026 by QCherry (talk | contribs) (Complete Lua function catalog)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getMinuteDuration

Returns how many real milliseconds one in-game minute currently takes.

Syntax

int durationMs = getMinuteDuration()

Parameters

This function does not accept parameters.

Returns

Returns the current duration in milliseconds. A value of 0 means that the world clock is paused.

Examples

Print the current clock rate:

local duration = getMinuteDuration()
if duration == 0 then
    outputDebugString("World clock is paused")
else
    outputDebugString("One game minute takes " .. duration .. " ms")
end

Notes

  • Available only in server-side resource scripts.