|
Javascript Analog Clock with alarm and timer(multi-alarm, multi-zone, statistical timer) Bug reports, suggestions, comments or any ideas may be sent to clock@tsiros.net |
Changes from the previous version (7 Feb 2004)
*NEW* You can "mark" a time and create a note by RightClick on the Hour or Minute hands. Clicking on the created time link you can write a short note. You can "erase" it when have done with it, by RightClick on the link.
LeftClicking on the "V 2.7" the alarms/notes window opens.
Added Timer (26/Jan/2004)(before use it, read The Timer) Some changes are left
Fixed javascript links so it will work with Active Desktop and more browsers.
When you set an alarm (clicking on OFF) the clock will set the alarm to ring at the closest hour.
i.e Say it is 06:00: clicking on 8, the alarm will be set to 08:00, clicking on 5, the alarm will be set to 17:00 - n.b. you can force the alarm to ring at 05:00 (next day) manually
Known Issues
Still problems with Netscape and Opera. Have fixed javascript support. May work better now, not tested.
I
nstructions / HELPHow to change the names of the days
Add the clock to your Windows Active Desktop
Before you start clicking, please read the following:
In order to hear the sound from the alarm, multiclock.htm must exist with a file named "notify.wav" in the same directory.
You can change the face of the clock by editing the day.gif and night.gif and you can modify when it changes by editing the endDay and startDay variables in the script.
CPU usage ~2%
Your browser must accept cookies in order to remember the settings.
Before you start clicking, please read the following:
The first time you open the clock you will see the correct local time and at the center of the clock you see the word "Local"
The current region is "Local". If you don't see it, press the label "LT" (i.e. Local Time).
Now click on the control with label "NY". At the center you see the label "New York". The current region now set to New York.
Directly below the "8 hour" there are now two visible controls. The upper one displays the time zone for New York "-5" (GMT-5)
The other is the "switch GMT/DST". This must be set to display "DST" if this region uses Daylight Saving Time (Summer Time)
If not, select GMT.
If the settings are correct the clock will display the correct time for New York.
At this moment (8 April 2003) Europe, USA and Russia use Summer Time (DST).
If the time is AM, you will see a picture with blue color else you will see another.
When you are at other region, eg. Sydney, you will see the Time Zone set to 10 GMT.
However in November 2003 when summer starts for Australia, you must change GMT to DST
Help for the alarm.
On the top left you see two controls
1. The alarm switch ON/OFF (now OFF)
2. The alarm counter which display "1".
This means that the first alarm for the current region is disabled
Move the yellow hand to some position with your mouse (left click at approximate time of alarm)
Then click on OFF to display ON. The first alarm is now enabled.
If you wish, you may now set a custom message. Right click on the "1" (the alarm counter) and write a message.
When the hour pointer reaches the yellow hand, a message is displayed with the name of city where the alarm is set.
If you want to add another alarm, click on the alarm counter. The switch turns to OFF and the alarm counter displays "2".
Or simply click a new alarm time and the alarm counter will jump to the next empty alarm position.
Turn the switch to ON. Right click on the "2" and write a message for the second alarm and so on.
You may browse through the alarms by continuously left clicking. When you reach the end you see the next empty position. This way you can delete unwanted alarms (by turning the switch to OFF) or set/change the message for any alarm.
If you have defined three alarms and you delete the first then the alarm counter will jump to the last alarm; which now is the second.
So you don't see the OFF and "1" but "ON" and "2"
When your mouse is over the alarm counter a small message box appears and displays the message set for that alarm.
When you enable the alarm for some regions, the labels of the regions change to red in order to remember pending alarms.
You can set a custom message for each alarm or change the time of it by right mouse clicking on the alarm counter.
LeftClicking on the version number will make the alarm window appear showing you all current pending alarms.
Repeated alarms
If you have something to do at regular time interval.(take a pill every 8 hours or drink two glass of water every 4 hours) this clock can help you.
By default the clock set the alarm at a specified time.Create an alarm (as described above). Dont care about the time.
Rightclick on the alarmcounter.You see the data for this alarm.Erase the data and write: + 12:00 8:00;the message (+ space 12:00 space 8:00;bla bla bla) Press OK.
You have defined an alarm that rings every 8 hours starting from 12:00 (12:00 is the BaseHour and the 8:00 is the StepHour)
The + 13:05 15 means repeat the alarm every 15 minutes starting from 13:05 (included)
The + 20 means repeat an alarm every 20 minutes from now (now not included )
The + 8:10 means repeat an alarm every 8 hours and 10 minutes from now
Don't forget the space or you will get an error
The stepHour cannot be greater then 23:59 or 59
Warning : DONT' CHANGE the hour of computer if you have pending alarms (either the clock is running or closed)
This Timer is a little complicated.But show what a Timer must do.
1. LeftClick on timer and the count start. LeftClick again stop. Now Rightclick and nothing happens (later what actually happens).Again Rightclick and the Timer show 00:00.
2.When the Timer show 00:00 by LeftClick or RightClick the Timer stores the StartTime. Think of StartTime as the Time when you start an observation
3.When the Timer stops (and stops only with LeftClick) the Timer stores the EndTime. Think (and actually is) of EndTime as the time you end an observation..
4.When the Timer is stopped, RightClick and the Timer stores again the EndTime.
5.When the Timer counts, by RightClick the display freezes but the Timer keeps counting until you.RightClick and unfreeze or LeftClick and the display will show when it has stopped
6.When you cause the timer to store the EndTime (as in 3,4) the hint of Timer ( the three first lines ) show ( in percent) the division (Duration of observed event) / (Duration of whole observation).Next the number of observed events and next the mean duration (in seconds).
When the Timer start with LeftClick, every time you press the RightClick the time of this event is stored.When you stop the Timer the hint display (the last two lines) how many times you have press the RightClick and the mean time between these events. This way you can track individual events.
Warning :this timer is accurate (in his own way) but does not work like a chronograph.
Hint: When working with Timer leave the window which display the alarms open.


Duration of observation : EndTime-StartTime= 06:43-05:44 = 59 sec (LeftClick) 06:54-05:44 = 70 sec (RightClick)
Number of observed events : 2. Duration of observed events (timer counter) 49 sec. Mean duration 49/2 = 24.5 sec
Per cent : 49/59 = 83% (LeftClick) 49/70= 70% (RightClick)
Think of the red dot as something which happens only when an event occurs.
Customizing regions
Suppose you want to fill some of the empty slots or change some of the cities (or all) or you want to change the language.
Simply right click on a region or an empty slot, fill the prompt dialog with the new data in the following form:
button label(twoletters);region_name;mouseover_message
example GR;Athens;Greece (and don't forget the semicolons)
Press OK
Click on the control which displays the GMT offset until it displays the correct GMT offset for the region. (if it reaches 13 restart from -11).
If the GMT offset is not whole number, refer to the hidden option
After this, click if needed on the "switch GMT/DST". Set to display the correct label for this region.
The hidden option
But what about Adelaide (GMT+9.50, i.e. 9hr 30'), Kathmandu (GMT+5.75, 5hr 45'), New Delhi (GMT+5.50, 5hr 30')
Right click on a region. You will see the data for that region. At the end add a semicolon (;) and after that the GMT offset
example: KA;Kathmandu;Capital of Nepal;5.75
Note! the offset is a decimal and not 5.45 (hh.mm)
For Adelaide you have to add ";9.50" and not ";9.30"
This option does not work for "LT" (Local Time) because there is no need.
Customizing names of days
RightClick on the "V 2.6" and answer at the prompt with the specified format.
Add the clock to your site
Click here to view popup clock.
If you want to use this clock add this code to the <head> section of your page.
This code will launch the clock in a popup window when your site is opened.
<script language="javascript">
open("multiclock.htm",
"clock", "width=142,height=168");
</script>
Download multiclock from tsiros.net
Download multiclock from www.chris.dunn.name
Add the clock to the Windows Active Desktop
The clock can be added to your desktop using Windows Active Desktop.
Open the display properties page either by right clicking on the desktop and choosing 'Active Desktop > Customize my Desktop' or by going to the Control Panel and selecting display. Go to the 'Web' tab.
1. Tick the box that says 'show Web content on my Active Desktop'
2. Click the 'NEW' button and select the file 'multiclock.htm'
3. The window will appear on your desktop. Close the properties page and move and resize the clock to suit. When you have it where you want it to stay right-click on the desktop and go to 'Active Desktop > Lock Desktop Items'. Your clock will now stay put.
If you deal with a lot of mathematical calculations, you may wish to try my SuperCalc