Update src/ui/Timer.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
3deb6f753a
commit
85ba9fd49e
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ const Timer: React.FC<TimerProps> = ({ startTime, color = "gray" }) => {
|
|||
const now = Date.now();
|
||||
const elapsedSeconds = Math.floor((now - startTime) / 1000);
|
||||
setElapsed(elapsedSeconds);
|
||||
}, 100); // Update every 100ms for smooth display
|
||||
}, 1000); // Update every 1000ms for efficient display
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}, [startTime]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue