Article View: borland.public.jbuilder.java.language
Article #19293Re: How to do nothing efficently
From: Tad Frysinger
Date: Wed, 18 Feb 1998 00:00
Date: Wed, 18 Feb 1998 00:00
22 lines
1155 bytes
1155 bytes
In article <887795101.24328.0.nnrp-09.c1ed6dcb@news.demon.co.uk>, Simon@wretched.demon.co.uk says... > Excuse a basic Java question, but how does a thread do nothing for a given > time efficiently. > > All the example pause routines I've seen loop until the system clock has > exceeded a certain value. > > I doubt this is very efficient. Is there something I am missing ? > > Appreciate some OS'es probably do not have good mechanisms for doing this, > but surely there should be a standard API call so that the OSes that do can > take advantage of it..... > > Any good pointers thread handling in JAVA appreciated as well. > > > > > Put your thread to .sleep()
Technical Details
Message-ID:
<MPG.f54837b3917817398979a@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<887795101.24328.0.nnrp-09.c1ed6dcb@news.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,fe1aa7da98d36a16 X-Google-Attributes: gidf74b3,public From: TFrysinger@aol.com (Tad Frysinger) Subject: Re: How to do nothing efficently Date: 1998/02/18 Message-ID: <MPG.f54837b3917817398979a@forums.borland.com> X-Deja-AN: 326202149 References: <887795101.24328.0.nnrp-09.c1ed6dcb@news.demon.co.uk> Organization: FreeZone Software Newsgroups: borland.public.jbuilder.java.language