什么是相当于setTimeout的GWT?

rav*_*avi 21 gwt

我想知道setTimeoutJavaScript中可用功能的GWT等价物吗?

我搜索了这个,但无法找到任何信息.

phi*_*hag 18

Timer.schedule

安排计时器在将来过去.

例如.:

Timer t = new Timer() {
  public void run() {
    Window.alert("Nifty, eh?");
  }
};

// Schedule the timer to run once in 5 seconds.
t.schedule(5000);
Run Code Online (Sandbox Code Playgroud)