Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (20 sloc) 511 Bytes
require "evc"
local loop = evc.default_loop()
print("loop: ", loop)
local tim = evc.timer_init(2, 0.5)
print("timer: ", tim)
local ct = 5
print(loop, tim)
tim:set_cb(function (w, ev)
ct = ct - 1
print("tick", w, evc.time())
if ct == 0 then tim:stop(loop) end
--for k,v in pairs(ev) do print("--> ", k,v ) end
print ""
print "set cb"
print "timer started"
print "about to loop"
print "Done"
Jump to Line
Something went wrong with that request. Please try again.