Luvit 2.5.6 Documentation


Timer#

Javascript style setTimeout and setInterval for luvit

local timer = require('timer')

timer.sleep(delay, thread)#

timer.setTimeout(delay, callback, ...)#

timer.setInterval(interval, callback, ...)#

timer.clearInterval(timer)#

timer.clearTimeout(timer)#

Alias for clearInterval

timer.clearTimer(timer)#

Alias for clearTimeout

timer.setImmediate(callback, ...)#

timer.unenroll(item)#

timer.enroll(time, msecs)#

timer.active(item)#