timer event
timer Event | |
---|---|
Returns
| |
Source | CC:Tweaked |
Occurs when a previously set timer has elapsed.
|
|||
Sets a timer at 5 seconds, then waits for it to finish. | |||
Code | <nowiki>
local myTimer = os.startTimer(5)
local event, timerNumber
while timerNumber ~= myTimer do
event, timerNumber = os.pullEvent("timer")
end
print("A timer has finished!")
</nowiki>
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.