A combined stopwatch and countdown timer built with vanilla JavaScript — no build step, no dependencies.
Live demo: https://sen.ltd/portfolio/stopwatch-timer/
- Start / Stop / Reset / Lap
- Lap list with individual and cumulative times
- Best lap (green) and worst lap (red) highlighting
- Timestamp-based accuracy (no interval drift)
- Flexible input:
1:30:00,90s,5m,1h30m, bare seconds - Start / Pause / Reset
- Audio beep on completion (Web Audio API)
- Browser notification on completion (with permission)
- Repeat mode — auto-restarts when done
- Large monospace digital display with milliseconds
- Keyboard shortcuts: Space (start/stop), R (reset), L (lap)
- Japanese / English UI toggle
- Dark theme
# Serve locally (no build required)
npm run serve
# then open http://localhost:8080Or just open index.html directly in a modern browser.
stopwatch-timer/
├── index.html # Single-page app
├── style.css # Dark-theme styles
├── src/
│ ├── main.js # DOM, events, render loop
│ ├── stopwatch.js# Pure stopwatch logic
│ ├── timer.js # Pure countdown timer logic
│ └── i18n.js # ja/en translations
├── tests/
│ ├── stopwatch.test.js
│ └── timer.test.js
└── package.json
npm testUses Node.js built-in test runner (node:test) — no extra packages needed.
| Key | Action |
|---|---|
| Space | Start / Stop |
| R | Reset |
| L | Lap (stopwatch only) |
MIT © 2026 SEN LLC (SEN 合同会社)