lalarm: multiple alarms?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: lalarm: multiple alarms?
- From: William Trenker <wtrenker@...>
- Date: 2005年7月28日 17:15:25 -0400
Is it possible to get several different, concurrent alarms running
using lalarm? So far all I can get is the most recent alarm
invocation to work, like this:
------------ begin lua code ---------------
function bing()
print("bing")
alarm(2)
end
function bong()
print("bong")
alarm(5)
end
print("starting now")
alarm(2, bing)
alarm(5, bong)
while true do
end
------------- end lua code ---------------------
When I run this only the 5-second timer runs, printing out "bong"
every 5 seconds.
Is there a way to run multiple alarms each with different timeouts?
Thanks,
Bill