Инструменты пользователя

  • Зашли как Anonymous (Anonymous)
  • Выйти

Инструменты сайта


mantis:simpletv:api:timer

Timer

timerID = SetTimer(Interval - number,scriptStr - string_ANSI,userValue,once - boolean)

Interval  - number in ms
scriptStr - lua script
once - boolean, optional, by default false, if true then fired once and auto deleted
userValue - any lua data, except function, optional, by default nil
Return Value
TimerId or nil 
example
--set once timer with user data 
 
local scr = 'local timerId,userValue = ...; callSomeFunction(timerId,userValue)'
 
SetTimer(1000,scr,{someField = 'someData'},true)

DeleteTimer(timerID)

timerID - value returned by SetTimer
mantis/simpletv/api/timer.txt · Последние изменения: 2020/04/01 21:07 — SergeyVS