update docs

This commit is contained in:
bol-van
2026-04-28 10:34:56 +03:00
parent b1afa7079f
commit bbaeeb73fe
2 changed files with 61 additions and 0 deletions
+31
View File
@@ -104,6 +104,8 @@
- [Timer control](#timer-control)
- [timer_set](#timer_set)
- [timer_del](#timer_del)
- [timer_info](#timer_info)
- [timer_enum](#timer_enum)
- [zapret-lib.lua base function library](#zapret-liblua-base-function-library)
- [Base desync functions](#base-desync-functions)
- [luaexec](#luaexec)
@@ -2444,6 +2446,35 @@ Delete the timer.
function timer_del(name)
```
#### timer_info
Get information about the timer identified by name.
```
function timer_del(name)
```
Returns table in case of success, nil otherwise.
| Field | Type | Description |
| :------ | :----- | :------------------ |
| name | string | unique timer name |
| func | string | timer function name |
| oneshot | bool | true = single shot timer, false = periodic timer |
| period | number | timer period in msec |
| fires | number | number of timer calls made |
#### timer_enum
Get an array of unique names of all existing timers.
```
function timer_enum()
```
# zapret-lib.lua base function library
+30
View File
@@ -101,6 +101,8 @@
- [Управление таймерами](#управление-таймерами)
- [timer_set](#timer_set)
- [timer_del](#timer_del)
- [timer_info](#timer_info)
- [timer_enum](#timer_enum)
- [Библиотека базовых функций zapret-lib.lua](#библиотека-базовых-функций-zapret-liblua)
- [Базовые desync функции](#базовые-desync-функции)
- [luaexec](#luaexec)
@@ -2604,6 +2606,34 @@ function timer_set(name, func, period, oneshot, data)
function timer_del(name)
```
#### timer_info
Получить информацию о таймере.
```
function timer_del(name)
```
В случае успеха возвращается таблица, в случае неудачи - nil.
| Поле | Тип | Описание |
| :------ | :----- | :------------------ |
| name | string | уникальное имя таймера |
| func | string | имя таймер функции |
| oneshot | bool | true = однократный таймер, false = периодический |
| period | number | период таймера в мсек |
| fires | number | количество выполненных вызовов таймера |
#### timer_enum
Получить массив уникальных имен всех существующих таймеров.
```
function timer_enum()
```
# Библиотека базовых функций zapret-lib.lua