Article View: borland.public.cppbuilder.nativeapi
Article #17563Re: Sleep, Wait or Pause Function?
From: Early Ehlinger
Date: Fri, 14 Mar 2003 14:41
Date: Fri, 14 Mar 2003 14:41
22 lines
1955 bytes
1955 bytes
"Warren Stewart" <stewtech@sbcglobal.net> wrote: > Something like sleep(500), or wait(500) to make app > suspend execution for 500 ms? Depends on what you mean by 500 ms. If you mean precisely 500 ms, as in you want something to happen exactly every 1/2 second, then the answer is 'no'. If you mean at *least* 500 ms, then the answer is: Sleep( 500 ); The reason is that b/c the Win32 family of operating systems are all pre-emptive, non-realtime OS's, the best guarantee they can offer is that your thread will not get the processor for at least the amount of time you tell the OS you want your thread to be out of the queue. -- -- Early Ehlinger CEO, ResPower Inc - Toll-Free : 866-737-7697 -- - RenderFarm - Lightwave , 3dSMax , Bryce , Maya , AfterEffects - --- www.respower.com -- 500+ GHz Starting At USD$0.50/GHz*Hour -- ----------------- SuperComputing For the Masses! ---------------- "I'm so busy programming my computer to let me be lazy, I never get any rest!" - John Kaster
Technical Details
Message-ID:
<3e71ea34$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3E711275.6C06527A@sbcglobal.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,748c800882c17b1d X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-15 09:13:29 PST From: "Early Ehlinger" <early@respower.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3E711275.6C06527A@sbcglobal.net> Subject: Re: Sleep, Wait or Pause Function? Date: Fri, 14 Mar 2003 08:41:27 -0600 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 206.166.224.226 Message-ID: <3e71ea34$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047652916 206.166.224.226 (14 Mar 2003 06:41:56 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail