Article View: borland.public.cppbuilder.nativeapi
Article #11456Re: Sleep time resolution
From: Asger J�rgensen
Date: Thu, 12 Feb 2004 10:33
Date: Thu, 12 Feb 2004 10:33
22 lines
1591 bytes
1591 bytes
Hi Detlef In article <402b4f78$1@newsgroups.borland.com>, Detlef says : > Hi all, > I'm using Win2K and like to communicate with a digital IO card with a > frequence of 200 Hz. I'm using a thread to send data to the card. > The problem is that windows supports only sleep timeslices of 10/15 ms ( > depending on processor) or Sleep(0). > If I use Sleep( 0) my process uses a lot of processor time. if You set down the priority of the thread it shouldn't slow down the PC. > Is there a way to create events or sleeps with a resolution of 5 milli > seconds with an accuracy of +/- 1 milli second? Maybe You can use a TTimer, but if You want it to be very accurat You have to find one on the net. Best regards Asger
Technical Details
Message-ID:
<MPG.1a9574fc30494ef7989719@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<402b4f78$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,3e6954a6a5dc7821 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-12 02:34:19 PST From: Asger J�rgensen <Asger.Pnotthis@AJ-World.dk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Sleep time resolution Date: Thu, 12 Feb 2004 11:33:48 +0100 Message-ID: <MPG.1a9574fc30494ef7989719@newsgroups.borland.com> References: <402b4f78$1@newsgroups.borland.com> Organization: AJ-World X-Newsreader: MicroPlanet Gravity v2.50 NNTP-Posting-Host: 80.164.88.221 X-Trace: newsgroups.borland.com 1076581819 80.164.88.221 (12 Feb 2004 02:30:19 -0800) Lines: 22 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail