Article View: borland.public.cppbuilder.nativeapi
Article #11458Re: Sleep time resolution
From: Leo Havm�ller
Date: Thu, 12 Feb 2004 11:33
Date: Thu, 12 Feb 2004 11:33
16 lines
1558 bytes
1558 bytes
"Detlef" <detlef.stute@seatec-gmbh.com> wrote in message news:402b4f78$1@newsgroups.borland.com... > 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. > > Is there a way to create events or sleeps with a resolution of 5 milli > seconds with an accuracy of +/- 1 milli second? A multi-media timer may be good enough for this. Lookup timeSetEvent in MSDN Library. Leo Havm�ller.
Technical Details
Message-ID:
<402b6477$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<402b4f78$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10cc67,3e6954a6a5dc7821 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-12 03:39:34 PST From: "Leo Havm�ller" <leh@-nospam-rtx.dk> Newsgroups: borland.public.cppbuilder.nativeapi References: <402b4f78$1@newsgroups.borland.com> Subject: Re: Sleep time resolution Date: Thu, 12 Feb 2004 12:33:10 +0100 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 80.63.27.146 Message-ID: <402b6477$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1076585591 80.63.27.146 (12 Feb 2004 03:33:11 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail