Assuming the user sets a time to elapse and then presses 'Go', you need to work out the time the countdown will expire, then set a recurring timer to check the difference (you'll get this in milliseconds) then display the difference in whatever format you choose. You need to work to an end time rather than have a timer tick every second and knock a second off the total. This is because the timer is not accurate - it depends on when the computer decides to give the browser a time-slice, and that depends on the computer loading and priorities and interrupts and so on. Over longer periods you can get quite an error margin.
You also need to set the Timer() you use to recur quite often, probably about every 100ms or the display won't click over evenly. If you set it to 1000ms for example, every so often you will skip the displaying of one of the seconds. Ian http://examples.roughian.com 2009/8/12 Charlie <codeboo...@gmail.com> > > Hey > > I've been trying to create a custom countdown timer, and for some > reason I can't find a way of createing a custom clock > for example "55:22:11" meaning 55 hours 22 minutes 11 seconds and when > the seconds are over it retracts from the minutes and the same for > hours. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---