From e11bc5bb1314cd753c9e1673c1ff11f596f05101 Mon Sep 17 00:00:00 2001 From: AuroraSloan Date: Fri, 3 Jun 2022 13:45:03 +0900 Subject: [PATCH] timeRemaining fix --- src/booth/ui.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/booth/ui.ts b/src/booth/ui.ts index b1ea124..644a2e6 100644 --- a/src/booth/ui.ts +++ b/src/booth/ui.ts @@ -4,7 +4,7 @@ import { PlayCloseSound, PlayCoinSound } from './sounds' export function timerBeforeClaim(createdTime: Date, delay: number) { const mmPrompt = new UI.CustomPrompt(undefined, 450, 200) - const timeRemaining = (+new Date() + delay - +createdTime) / 1000 + const timeRemaining = (+createdTime - +new Date() + delay) / 1000 log(timeRemaining) const minutes = Math.floor(timeRemaining / 60) const seconds = Math.floor(timeRemaining - minutes * 60)