mirror of
https://codeberg.org/1414codeforge/gear.git
synced 2025-06-05 22:09:24 +02:00
[timer] Handle cancel(nil) as NOP.
This commit is contained in:
@ -88,8 +88,10 @@ function Timer:every(delay, after, count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Timer:cancel(handle)
|
function Timer:cancel(handle)
|
||||||
|
if handle then
|
||||||
self.functions[handle] = nil
|
self.functions[handle] = nil
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function Timer:clear()
|
function Timer:clear()
|
||||||
self.functions = {}
|
self.functions = {}
|
||||||
|
Reference in New Issue
Block a user