Pages

Wednesday, October 12, 2016

Traditional Stopwatch

Here is a JavaScript implementation of a traditional stopwatch that has a Timer and displays elapsed times in milliseconds.


New stopwatch!




A stopwatch is a handheld timepiece designed to measure the amount of time elapsed from a particular time when it is activated to the time when the piece is deactivated.

The timing functions are traditionally controlled by two buttons on the case. Pressing the top button starts the timer running, and pressing the button a second time stops it, leaving the elapsed time displayed. A press of the second button then resets the stopwatch to zero. The second button is also used to record split times or lap times. When the split time button is pressed while the watch is running, the display freezes, allowing the elapsed time to that point to be read, but the watch mechanism continues running to record total elapsed time. Pressing the split button a second time allows the watch to resume display of total time.

Source: https://en.wikipedia.org/wiki/Stopwatch (retrieved on 12 Oct 2016)