Skip to main content

shared timer:create

timerObj timer:create(id, interval, ticks, callback)

Creates a timer using the unique id, triggering every x seconds for an x ammount of times.
If ticks is set to <= than 0, it will run infinitely


Parameters

TypeNameDescriptionOptional
stringidNo description
numberintervalNo description
numberticksNo description
functioncallbackfun(data?: any): void

Returns

TypeDescription
timerObjNo description