summaryrefslogtreecommitdiff
path: root/src/util/timer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/timer.ts')
-rw-r--r--src/util/timer.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/util/timer.ts b/src/util/timer.ts
index 9d743b8e9..5f37a6f4d 100644
--- a/src/util/timer.ts
+++ b/src/util/timer.ts
@@ -25,6 +25,9 @@
* Imports.
*/
import { Duration } from "./time";
+import { Logger } from "./logging";
+
+const logger = new Logger("timer.ts");
/**
* Cancelable timer.
@@ -119,7 +122,7 @@ export class TimerGroup {
after(delayMs: number, callback: () => void): TimerHandle {
if (this.stopped) {
- console.warn("dropping timer since timer group is stopped");
+ logger.warn("dropping timer since timer group is stopped");
return nullTimerHandle;
}
const h = after(delayMs, callback);
@@ -138,7 +141,7 @@ export class TimerGroup {
every(delayMs: number, callback: () => void): TimerHandle {
if (this.stopped) {
- console.warn("dropping timer since timer group is stopped");
+ logger.warn("dropping timer since timer group is stopped");
return nullTimerHandle;
}
const h = every(delayMs, callback);