cancel
cancel — removes a timer from the set of pending timers.
Syntax
cancel (timer_number)
Arguments
- timer_number
An integer number returned from a call
to after, at or every.
Returns
The complete timer definition for the canceled timer, or nil if no timer was
canceled.
Description
Removes a timer from the set of pending timers based on
its unique timer ID as returned by the function which
created the timer. If no timer could be found with the
corresponding timer number, nothing happens.
Example
To set a
timer to repeat every 5 seconds, then stop it:
Gamma> every(5, #princ("hello\n"));
1
Gamma> cancel(1);
[945884155 683256506 5 ((princ "hello\n")) 1]
Gamma>