voxelcore/doc/en/scripting/builtins/libtime.md
2026-08-18 21:57:51 +05:00

645 B

time Library

-- Returns the time since engine startup in seconds and milliseconds.
time.uptime() -> number

-- Returns the time delta in seconds and milliseconds (time elapsed since the previous frame)
time.delta() -> number

-- Returns UTC time in seconds
time.utc_time() -> int

-- Returns UTC time in seconds with millisecond precision
time.precise_utc_time() -> number

-- Returns local (system) time in seconds
time.local_time() -> int

-- Returns the local time offset from UTC in seconds
time.utc_offset() -> int

-- Returns high-precision time in seconds (elapsed since the engine startup).
time.precise_time() -> number