summaryrefslogtreecommitdiff
path: root/src/util/timer.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-23 19:24:00 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-23 19:24:00 +0530
commit56ece296e0e13de3c796a4ac317c6ce9e4fd7c28 (patch)
treec5d009987c5937ab1ecf17985222d1edc80323ab /src/util/timer.ts
parent80433b939962815ad8807b0d6e957d66dbd0e306 (diff)
downloadwallet-core-56ece296e0e13de3c796a4ac317c6ce9e4fd7c28.tar.gz
wallet-core-56ece296e0e13de3c796a4ac317c6ce9e4fd7c28.tar.bz2
wallet-core-56ece296e0e13de3c796a4ac317c6ce9e4fd7c28.zip
implement common wallet-core API handler
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);