mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
update doc/*/scripting/builtins/libtime.md
This commit is contained in:
parent
7c2b7bd813
commit
1868896243
2 changed files with 22 additions and 11 deletions
|
|
@ -1,13 +1,21 @@
|
|||
# *time* library
|
||||
# *time* Library
|
||||
|
||||
```python
|
||||
time.uptime() -> float
|
||||
```lua
|
||||
-- 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 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
|
||||
```
|
||||
|
||||
Returns time elapsed since the engine started.
|
||||
|
||||
```python
|
||||
time.delta() -> float
|
||||
```
|
||||
|
||||
Returns time elapsed since the last frame.
|
||||
|
|
|
|||
|
|
@ -15,4 +15,7 @@ time.local_time() -> int
|
|||
|
||||
-- Возвращает смещение локального времени от UTC в секундах
|
||||
time.utc_offset() -> int
|
||||
|
||||
-- Возвращает время высокой точности в секундах. За точку отсчёта берётся запуск движка.
|
||||
time.precise_time() -> number
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue