/
component.setTimer{}

component.setTimer{}

component.setTimer{ } is used to set a component or function poll time

By default, it sets time (delay in milliseconds) for the main function, unless the callback parameter is specified with another function.

local TimerId = component.setTimer{delay=1000, callback=OnTimer, data="Some Data"} function OnTimer(Data) -- This function will be called when the timer is triggered end

 

Related content

component.isStopping()
component.isStopping()
More like this
Testing HTTP Interface with wget and curl
Testing HTTP Interface with wget and curl
Read with this
setTimeout and setInterval - timed events
setTimeout and setInterval - timed events
More like this
Configuring SELinux
Configuring SELinux
Read with this
Timer (polling)
Timer (polling)
More like this
Component APIs
Component APIs
Read with this