Re: how can I stop a thread from sleeping?
From: Christophe Vanfleteren (c.v4nfl3t3r3n_at_pandora.be)
Date: 10/31/03
- Next message: Andrew Thompson: "Re: Source for j2eesdk1.4_beta2?"
- Previous message: mimisam: "how can I stop a thread from sleeping?"
- In reply to: mimisam: "how can I stop a thread from sleeping?"
- Next in thread: Andrew Thompson: "Re: how can I stop a thread from sleeping?"
- Reply: Andrew Thompson: "Re: how can I stop a thread from sleeping?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Andrew Thompson: "Re: Source for j2eesdk1.4_beta2?"
- Previous message: mimisam: "how can I stop a thread from sleeping?"
- In reply to: mimisam: "how can I stop a thread from sleeping?"
- Next in thread: Andrew Thompson: "Re: how can I stop a thread from sleeping?"
- Reply: Andrew Thompson: "Re: how can I stop a thread from sleeping?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]