From 7d474b8f87cb5038ddc484eba48c0a85a979c730 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Mon, 8 Aug 2022 15:59:03 +0200 Subject: [PATCH] move calc directly into the func instead making new const --- timer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/timer.js b/timer.js index 3ba3aae..9c973cf 100644 --- a/timer.js +++ b/timer.js @@ -6,8 +6,7 @@ class Timer { } endTimer() { - const ELAPSED = Date.now() - this.start; - return prettytime(ELAPSED, { decimals: 2 }); + return prettytime(Date.now() - this.start, { decimals: 2 }); } }