Article View: borland.public.cppbuilder.nativeapi
Article #15819Re: how to sleep 10 milisecond
From: Martin Moeller
Date: Fri, 13 Jun 2003 18:40
Date: Fri, 13 Jun 2003 18:40
18 lines
1795 bytes
1795 bytes
"Boguslaw Fries" <B.Fries@luca-online.de> ha scritto nel messaggio news:3ee8c0df@newsgroups.borland.com... > Hello, > 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 > Forget messages and events. Someone told me (not verified by me yet) that Sleep(); (without value) does just release the thread's timeshare. That would allow to write a close loop and verify by GetTickCount the elapsed time each time you loop. Mind that, of course, if you are not 'taken' back to your thread quickly enough by the other tasks, you can do absolutelly nothing with whatever type of timer you choose: interrupt programmation is not possible under windows. Rgds, Martin
Technical Details
Message-ID:
<3eea1aa6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<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-13 11:53:36 PST Reply-To: "Martin Moeller" <martin.moeller@moema.it> From: "Martin Moeller" <martin.moeller@moema.it> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ee8c0df@newsgroups.borland.com> Subject: Re: how to sleep 10 milisecond Date: Fri, 13 Jun 2003 20:40:34 +0200 Lines: 20 Organization: Moe.Ma Italiana Srl X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 213.45.0.170 Message-ID: <3eea1aa6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1055529638 213.45.0.170 (13 Jun 2003 11:40:38 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail