mirror of
https://github.com/bol-van/zapret2.git
synced 2026-06-17 12:50:04 +04:00
update docs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user