aboutsummaryrefslogtreecommitdiff
path: root/src/timer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.ts')
-rw-r--r--src/timer.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/timer.ts b/src/timer.ts
index 289b46f16..9439b7199 100644
--- a/src/timer.ts
+++ b/src/timer.ts
@@ -79,7 +79,9 @@ export function after(delayMs: number, callback: () => void): TimerHandle {
const nullTimerHandle = {
clear() {
- }
+ // do nothing
+ return;
+ },
};
/**
@@ -109,7 +111,7 @@ export class TimerGroup {
return nullTimerHandle;
}
const h = after(delayMs, callback);
- let myId = this.idGen++;
+ const myId = this.idGen++;
this.timerMap[myId] = h;
const tm = this.timerMap;
@@ -128,7 +130,7 @@ export class TimerGroup {
return nullTimerHandle;
}
const h = every(delayMs, callback);
- let myId = this.idGen++;
+ const myId = this.idGen++;
this.timerMap[myId] = h;
const tm = this.timerMap;