If you are using Libgdx, you can use the libgdx Timer framework to schedule future work:
Timer t = new Timer(); t.scheduleTask(new Timer.Task() { public void run() { } }), 5);
This way you can schedule a timer in your platform-independent code. (A GWT-specific solution will only work in the platform-specific part of your project.)
source share