From b134b8deb84fcc29e826db1643a0c3ffcfdc73de Mon Sep 17 00:00:00 2001 From: adrien Date: Sat, 22 Apr 2023 15:00:51 +0200 Subject: [PATCH] clock --- app.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index 0c67591..9dab76e 100644 --- a/app.js +++ b/app.js @@ -475,11 +475,7 @@ class Stats { } get time() { - return new Date() - this._time - } - - clock() { - timeCell.innerText = this.timeFormat.format(this.time) + return this.timeFormat.format(new Date() - this._time) } lockDown(nbClearedLines, tSpin) { @@ -607,7 +603,7 @@ function resume(event) { } function clock() { - stats.clock() + timeCell.innerText = stats.time } function generate(piece=nextQueue.shift()) {