I am seeing a strange behaviour so I'd appreciate if someone can
explain the workings of the Timer class to me.

I have a piece of code that executes in the run() method when a
disconnection from the server is detected. More specifically, the user
is prompted a message for disconnection if the server stops sending a
ping. If I get a ping I will reset the timer. If I do not get a ping
within 20 seconds I will show the disconnection message.

So here is the problem. If I change my system time, the disconnection
message is displayed to the user right away. More specifically, I
change the time 1 minute into the future. I also tried 20 seconds into
the future and it also disconnected. But if change the time into the
past it doesn’t matter. I would also say that changing the time into
the future by 5 seconds or anything below 20, does not affect the
timer (although more testing is required).

Is the time change affecting how the timer operates? Is it determining
the elapsed time based on the system clock?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to