This JavaScript decimal timer/chronometer has been designed
with the following two main features in mind:
It's display, changing every 0.1' (or 6"), is not too
fast nor too slow — slower than a regular chronometer's
(every 1") and faster than a clock-radio's (every 1') — so
it's not distracting while it gives you a good idea of
about how much time you need to the next minute.
It is easily visible from a distance.
If you opt to save this webpage on your desktop to use it
when offline, you will also be able to modify its display, by
opening the file in a text editor and making changes in the
code; for example:
To change the timer's font size permanently, change
1000% in
font-size: 1000%;
To change the timer's color, change "Red" to
"Lime" (or "Yellow" or "White"
or "Cyan" or "Magenta") in
panel.style.color = "Red";
To bring the timer higher on the screen, change
5em in the line
padding-top: 5em;
If you prefer to have it show whole minutes rather than
decimals, replace both 10 with 1 in
the line
dif = Math.floor(dif * 10) / 10; and add // before the line
dif = (dif === Math.floor(dif)) ? dif +
".0" : dif;
Note that you may have to adjust the screen saver or the
power settings so that the timer will not be interrupted.
For any comments or bug reports, please contact the webmaster
(emfril at gmail dot com).
Comments
This JavaScript decimal timer/chronometer has been designed with the following two main features in mind:
If you opt to save this webpage on your desktop to use it when offline, you will also be able to modify its display, by opening the file in a text editor and making changes in the code; for example:
To change the timer's font size permanently, change
1000%
infont-size: 1000%;
To change the timer's color, change
"Red"
to"Lime"
(or"Yellow"
or"White"
or"Cyan"
or"Magenta"
) inpanel.style.color = "Red";
To bring the timer higher on the screen, change
5em
in the linepadding-top: 5em;
If you prefer to have it show whole minutes rather than decimals, replace both
10
with1
in the linedif = Math.floor(dif * 10) / 10;
and add
//
before the linedif = (dif === Math.floor(dif)) ? dif + ".0" : dif;
Note that you may have to adjust the screen saver or the power settings so that the timer will not be interrupted.
For any comments or bug reports, please contact the webmaster (emfril at gmail dot com).