https://developers.google.com/web-toolkit/doc/latest/DevGuideCodingBasicsDelayed
Notice that the timer will not have a chance to execute the run() method until after control returns to the JavaScript event loop.
Sometimes you want to break up your logic loop so that the JavaScript event loop gets a chance to run between two pieces of code. The Scheduler class will allow you to do that.
The logic that you pass to Scheduler
will run at some point in the future, after control has been returned to the JavaScript event loop.
This little delay may give the interface a chance to process some user events or initialize other code.
To use the Scheduler
class in its simplest form, you create a subclass of the Command class, overriding the execute() method and pass it to Scheduler.scheduleDeferred