๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sleep time resolution

#11457
From: Detlef
Date: Thu, 12 Feb 2004 11:28
31 lines
2202 bytes
Hi Asger,
a ttime has two problems:
- it depends on the message system, it is not independent what happens on
the GUI ( that is the reason for the thread)
- the maximum resolution is 1/60 second
So this does not work for me.
Detlef
"Asger J๏ฟฝrgensen" <Asger.Pnotthis@AJ-World.dk> schrieb im Newsbeitrag
news:MPG.1a9574fc30494ef7989719@newsgroups.borland.com...
> 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: <402b631f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <402b4f78$1@newsgroups.borland.com> <MPG.1a9574fc30494ef7989719@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:29:46 PST
Reply-To: "Detlef" <detlef.stute@seatec-gmbh.com>
From: "Detlef" <detlef.stute@seatec-gmbh.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <402b4f78$1@newsgroups.borland.com> <MPG.1a9574fc30494ef7989719@newsgroups.borland.com>
Subject: Re: Sleep time resolution
Date: Thu, 12 Feb 2004 12:28:00 +0100
Lines: 33
Organization: SEATEC GmbH
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.134.74.254
Message-ID: <402b631f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076585247 80.134.74.254 (12 Feb 2004 03:27:27 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!t-online.de!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail