Stopwatch
Start, stop, and record laps · Tool ●○○
Change these if you like
Prompt
Make a stopwatch. Make it a single HTML file that opens in a browser with nothing to install and no other files. Put the CSS and JavaScript inside it. Do not use image files or any external address; use emoji or letters if you need a symbol. Show the elapsed time large in the middle, to hundredths of a second. Three buttons: start and stop on the same button, lap, and reset. Each lap goes in a list underneath with its own time and the gap since the previous lap. Mark the fastest and slowest laps so they stand out. Work the elapsed time out from the clock rather than counting ticks. If I switch tabs for a minute and come back, the time must be right. When you are done, check that stopping and starting again continues rather than restarting, and that reset clears the laps too.
What it uses: One file only · Say what it is first · Pin down what not to do
If the time drifts while the tab is hidden, ask it to "store the start time and subtract, instead of adding on an interval".
Paste what came back
You might also like