os.cancelAlarm

From ComputerCraft
Jump to navigation Jump to search

os.cancelAlarm
Function
Syntax
os.cancelAlarm()
Returns nil
API os
Source CC:Tweaked (source)

Stops a Alarm.

The Alarm event will not be fired when the alarm triggers after calling this function.

You can set a alarm with with os.setAlarm.

Error creating thumbnail: Unable to save thumbnail to destination
ExampleStarts and stops a alarm.
Starts a Alarm for 5 seconds, then stops it after 3 seconds.
Code
local Id = os.setAlarm(5)
sleep(3)
os.cancelAlarm(Id)