Article View: borland.public.jbuilder.java.language
Article #15893Re: How to let the main application sleep ?
From: Tad Frysinger
Date: Tue, 27 Apr 1999 00:00
Date: Tue, 27 Apr 1999 00:00
20 lines
1373 bytes
1373 bytes
In article <371F06EF.1C2628DE@infn.it>, fonti@infn.it says... > 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. > > > What is the goal? Are you trying to make your app unavailable for a period of time? There are ways to simulate putting the app to sleep, but it will appear to the user as if it has hung. Are you sure you don't just want to make it unavailable for normal use while it counts down the time, perhaps having a "resume" button to "wake it up" again? This is also doable, but of course the entire app isn't really "sleeping" (otherwise you couldn't see the countdown or have a "resume" button that is active). Tad Frysinger (TeamB)
Technical Details
Message-ID:
<MPG.118f924094fd75e79899cd@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<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: tfrysinger@earthlink.net (Tad Frysinger) Subject: Re: How to let the main application sleep ? Date: 1999/04/27 Message-ID: <MPG.118f924094fd75e79899cd@forums.borland.com> X-Deja-AN: 471515862 References: <371F06EF.1C2628DE@infn.it> Organization: Freezone Enterprises Newsgroups: borland.public.jbuilder.java.language