The way I see it, to overcome the differences between local clocks you must use a robot or a web service that will tell you the time. The gadget will make a request to that service whenever it is rendered by a client. Thereafter it will just tick using javascript.
Here is an example of such a service: http://everybodywave.appspot.com/whatisthetime.py Javascript code that can sample it within a gadget: var sharedTime = null; var timeServerUrl = 'http://everybodywave.appspot.com/whatisthetime.py<http://everybodywave.appspot.com/whatisthetime.py>?ts='+new Date().getTime(); var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT; gadgets.io.makeRequest(timeServerUrl, onTimeServerAnswer, params); function onTimeServerAnswer(answer) { sharedTime = parseInt(answer.text); startToTick(); } The use of the parameter "ts" in the query string of the request is needed in order to disable the cache of makeRequest(). You can use a random number just the same. On Mon, Feb 8, 2010 at 3:38 AM, qMax <[email protected]> wrote: > [sorry for fingeroughness] > > i'ts quite reasonable to make installer gadget instance to alarm > robot, > in hope that installer/moderator will not close the wave or > disconnected beforehand. > > -- > 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]<google-wave-api%[email protected]> > . > For more options, visit this group at > http://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.
