Re: How to simulate Thread.sleep in GWT?

2012-01-24 Thread objectuser
Could you just have the final part of the test *be* the firing of the timer? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/iMANGW2SapgJ. To po

Re: How to simulate Thread.sleep in GWT?

2012-01-24 Thread Colin Alworth
GwtTestCase has support for waiting until an asynchronous part of the test is complete - check out the delayTestFinish(int) and finishTest() methods. Beyond that, there really is no way to generally pause execution. You can use one timer to watch another timer, and call cancel on it if it runs f

Re: How to simulate Thread.sleep in GWT?

2012-01-24 Thread Jim Douglas
There's really no good answer. JavaScript isn't multi-threaded, so there's no way to do anything like Java's Thread.sleep(). Since there's no real equivalent, the answer always boils down to "what precisely are you trying to accomplish?" You can try reviewing what other people have suggested: h