From 7b0b109fb4abf570e98511254fcd1c364475b638 Mon Sep 17 00:00:00 2001 From: Jaybe Date: Thu, 3 Jul 2025 07:18:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/public/bowlspeed/index.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/public/bowlspeed/index.html b/frontend/public/bowlspeed/index.html index 3aaa0c1..d4f9d2b 100644 --- a/frontend/public/bowlspeed/index.html +++ b/frontend/public/bowlspeed/index.html @@ -489,9 +489,13 @@ toggleBtn.textContent = '시작'; toggleBtn.classList.remove('running'); - // 자동으로 시간 입력 및 계산 - const seconds = elapsedTime / 1000; - document.getElementById('time').value = perRound(seconds, 3); + // 스톱워치 정지 시 정확한 시간 계산 + updateStopwatchDisplay(); // 스톱워치 표시 갱신 + + // 스톱워치와 동일한 값을 입력 필드에 설정 + const exactSeconds = Math.floor((elapsedTime % 60000) / 1000) + ((elapsedTime % 1000) / 1000); + document.getElementById('time').value = exactSeconds.toFixed(3); + calculateSpeed(); } } @@ -523,6 +527,7 @@ const display = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}.${milliseconds.toString().padStart(3, '0')}`; document.getElementById('stopwatch-display').textContent = display; + }