On 24 mar, 13:43, denis56 <[email protected]> wrote:
>
> private Timer timer = new Timer() {
> @Override
> public void run() {
> blinkBlinkables();
> }
> };
> timer.scheduleRepeating(500);
>
> In this case I am using scheduleRepeating instead of schedule since
> the code flow is not asynchronous, as I think.
Unless blinkBlinkables is really fast and given the low interval (semi-
second), I'd use a timer re-scheduling itself, as you did with your
RPC call:
new Timer() {
public void run() {
blinkBlinkables();
this.schedule(500);
}
}.schedule(500);
> I though that having 2 timers running along each other may be causing
> the problems, should it? Maybe it is better to have just one that
> would run two separate tasks (updates and blinking) or I am missing
> something?
It would needlessly complicate your code and I doubt it'd change much
thing (the above change might have a more noticeable effect).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---