Wouldn't the timer be off every time the browser/computer freezes if you use a timer duration in the calculation and just count the ticks? If your browser freezes for a second, the timer is off by a second. If it freezes for 5 seconds, it's off by 5 seconds.
What I did is I store the start time of the timer and then I just calculate: current time - start time. Then it's always exact, even if your computer freezes for 10 minutes (happens). The same for the eggtimer mode. I store the alarm time and calculate: alarm time - current time. Works great. If you combine that with the server side clock, you would just add the local/server clock difference in every calculation (only downloading the server time once of course and calculating the local/server difference for use in all your other calculations). On Feb 8, 2:22 am, "pamela (Google Employee)" <[email protected]> wrote: > My idea - > > If it was done strictly as a gadget, then the gadget would just store > the time that a timer started, and the duration of the timer. Then, > the wave would only be updated when someone set a new timer -- which > makes sense to me. > The actual time countdown would be done in Javascript, and be based on > a calculation of the start time, current time, and timer duration. > > - pamela > > > > On Mon, Feb 8, 2010 at 11:59 AM, qMax <[email protected]> wrote: > > Athttp://googlewavedev.blogspot.com/2010/02/my-extension-wish-wave-time... > > Anna-Christina Douglas wrote: > >> I would love a collaborative timer, clock, or stopwatch that I could put > >> at the top of a wave when the meeting starts. > > > being implemented as a gadget, the timer will be updated in every > > instance of the gadget. > > which is quite wrong thing. > > > One way is: > > The gadget raise an election among gadget instances to select which > > instance will update the timer. > > The election should be reraised when the instance is closed - but how > > to determine this event? > > > Another way: > > The timer is updated by robot and the time propagated to the gadget. > > This requires cron events for every, say, second. This looks > > overwhelming. > > And is it yet possible to update a wave by cron, rather then as > > ersponce to event? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Wave API" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/google-wave-api?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
