mirror of
https://github.com/denoland/deno.git
synced 2024-11-25 15:29:32 -05:00
delete timer in the Map(timers) when call clearTimer (#215)
This commit is contained in:
parent
c977cba123
commit
072fcd6b0e
1 changed files with 1 additions and 0 deletions
|
@ -81,6 +81,7 @@ export function setInterval(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function clearTimer(id: number) {
|
export function clearTimer(id: number) {
|
||||||
|
timers.delete(id);
|
||||||
pubInternal("timers", {
|
pubInternal("timers", {
|
||||||
command: pb.Msg.Command.TIMER_CLEAR,
|
command: pb.Msg.Command.TIMER_CLEAR,
|
||||||
timerClearId: id
|
timerClearId: id
|
||||||
|
|
Loading…
Reference in a new issue