Skip to main content

timer:create

boolean 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 less or equal than 0, it will run infinitely


Parameters

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

Returns

TypeDescription
booleanNo description