Re: how can I stop a thread from sleeping?

From: Christophe Vanfleteren (c.v4nfl3t3r3n_at_pandora.be)
Date: 10/31/03


Date: Fri, 31 Oct 2003 09:21:26 GMT

mimisam wrote:

> hi,
>
> I have a program(like the following codes) which needs to sleep for 20
> seconds. How can i make it stop sleeping if i want it to be alive
> before 20 seconds is up?(e.g. when a cancel button is clicked).
> Any help will be appreciated !!
> Thanks.
>
> public static void a()
> {
> delay(20000);
> }
>
> public static void delay(int d)
> {
> try {
> Thread.sleep(d);
> } catch (InterruptedException e) {}
> }

You might want to check the answer you got in c.l.j.help instead of posting
here again 3 minutes later.

-- 
Regards,
Christophe Vanfleteren