commitra / commitra/vanilla-verse

Stopwatch — start, pause, reset, and lap with precise timing

Open
#162 4 comments 0 reactions 1 assignee Claimed by @ctokam View on GitHub
enhancement good first issue hacktoberfest2025
Dominant language
JavaScript
Stars
14
Forks
60
PR merge metrics
No merged PRs in 30d

Description

### Project slug (e.g., snake, todo)

stopwatch

### Summary

Implement a high-precision stopwatch using performance.now() or requestAnimationFrame with start/pause/reset/lap.

### Details / Acceptance criteria

Acceptance Criteria:
- Start/pause/resume/reset controls work.
- Laps list shows timestamp and delta since previous lap.
- Time format: mm:ss.mmm (zero-padded).
- Continues to display accurate time when tab is inactive.
- Keyboard shortcuts: Space (start/pause), L (lap), R (reset).
- Accessible buttons with roles/labels.

Files:
- projects/stopwatch/index.html
- projects/stopwatch/styles.css
- projects/stopwatch/main.js

Tasks:
- Render time and controls.
- Timing loop using performance.now() delta.
- Manage laps array and render list.
- Add keyboard handlers and focus states.

### Scope

- [ ] UI changes
- [ ] Logic changes
- [ ] Accessibility
- [ ] Tests (manual)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.