From 56ece296e0e13de3c796a4ac317c6ce9e4fd7c28 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 23 Jul 2020 19:24:00 +0530 Subject: implement common wallet-core API handler --- src/util/timer.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/util') 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); -- cgit v1.2.3