🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15849

Re: How to let the main application sleep ?

#15849
From: V
Date: Thu, 22 Apr 1999 00:00
15 lines
1194 bytes
I don't believe you'd want the main thread to sleep, because it's
responsible for updating the display and then your application would appear
to lock up for a while.

If you're using Java 2, try the Timer class and use it to call one of your
procedures in x milliseconds.

Luigi Fonti <fonti@infn.it> wrote in message
news:371F06EF.1C2628DE@infn.it...
> In a thread, you can use sleep(millisecs) or wait(millisecs) to suspend
> the activity.
> But, how can you force the main application to sleep for a given time ?
> The compiler doesn't allow calling these methods in the main
> application: you can use them only in a trhead.
> Luigi Fonti.
Technical Details
Message-ID: <7foh8j$8624@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <371F06EF.1C2628DE@infn.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,af16e2ac36663003
X-Google-Attributes: gidf74b3,public
From: "|�V" <Evan S. Wirt>
Subject: Re: How to let the main application sleep ?
Date: 1999/04/22
Message-ID: <7foh8j$8624@forums.borland.com>
X-Deja-AN: 469787859
References: <371F06EF.1C2628DE@infn.it>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.language