🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15797

Re: how to sleep 10 milisecond

#15797
From: Bob Gonder
Date: Thu, 12 Jun 2003 22:15
15 lines
1527 bytes
"Boguslaw Fries" <B.Fries@luca-online.de> wrote:

>I need a function, which sleeps my thread for 5 - 10 milisecond but not
>more!
>Standad function Sleep( 10 ) - in cfact sleeps my thread fo 30 milisecond
>
>Any suggestions?

Three suggestions:
1) Get rid of Windows and use a real-time OS.
2) Up your priority and only Sleep(5). You'll come back sometime after
the 5, and with a high enough priority, you stand a chance of comming
back within 10 (I'd guess).
3) Aren't there some high precision timers that would trigger you when
they go off?
Technical Details
Message-ID: <ejuhevkfhbar1ca95u5jrkg3a4mtbie16j@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ee8c0df@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b6af681927951d13
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-12 15:27:47 PST
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: how to sleep 10 milisecond
Date: Thu, 12 Jun 2003 15:15:39 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <ejuhevkfhbar1ca95u5jrkg3a4mtbie16j@4ax.com>
References: <3ee8c0df@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.31.185.190
X-Trace: newsgroups.borland.com 1055456146 67.31.185.190 (12 Jun 2003 15:15:46 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail