os.cancelTimer
The Timer event will not be fired when the timer finishes after calling this function.
os.cancelTimer Function | |
---|---|
Syntax os.cancelTimer(
| |
Returns | nil |
API | os |
Source | CC:Tweaked (source) |
Stops a timer.
You can start a timer with os.startTimer.
|
|||
Starts a Timer with 5 seconds, then stops it after 3 seconds. | |||
Code | <nowiki>
local Id = os.startTimer(5)
sleep(3)
os.cancelTimer(Id)
</nowiki>
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.