GetMinuteDuration: Difference between revisions
Jump to navigation
Jump to search
Automatyczna aktualizacja dokumentacji funkcji |
Complete Lua function catalog |
||
| Line 28: | Line 28: | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:World Functions]] | [[Category:World Functions]] | ||
Latest revision as of 09:52, 15 August 2026
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.