Files
lualibs-winapi/examples/event.lua
T
2012-06-22 13:07:05 +02:00

20 lines
325 B
Lua

local W = require 'winapi'
local e = W.event()
local count = 1
local finished
W.make_timer(500,function()
print 'tick'
if count == 5 then
print 'finished!'
finished = true
end
e:signal()
count = count + 1
end)
while not finished do
e:wait()
print 'gotcha'
end