🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Sleep( ) differences in Win98 and WinXP?

#12752
From: Nicholas Gessler
Date: Thu, 20 Nov 2003 03:18
19 lines
1815 bytes
Yes, it's me again, with the annoying questions about speed differences in talking to COM1 in Win98 and WinXP.

I have taken your excellent suggestions and converted all the
TransmitCommChar() calls to WriteFile() calls.  That has 
made operation much more stable.  But in the process I have
found that the Sleep() calls accounted for most of the speed differences.

I had used Sleep() to delay calls to COM1 in order to control 
the speed of a stepper motor at the other end.  It is Sleep() 
that works fine in Win98 and poorly in WinXP.  

You could call Sleep() with arguments of from 1 to 10 milliseconds in Win98 and those differences meant something.
In WinXP Sleep() seems to have a lower threshold.  

OK.  So I still need something to alter the speed of WriteFile() calls to COM1.  Is there something better than Sleep() for WinXP?  Or should I begin to mess about with the timing of the 
Serial Port?

Thanks, Nick
Technical Details
Message-ID: <3fbc4093$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a735156abe5db193,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-11-19 20:39:36 PST
From: "Nicholas Gessler" <gessler@ucla.edu>
Sender: "Nicholas Gessler" <gessler@ucla.edu>
Reply-To: "Nicholas Gessler" <gessler@ucla.edu>
Subject: Sleep( ) differences in Win98 and WinXP? 
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 4.60.102.178     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <3fbc4093$1@newsgroups.borland.com>
Date: 19 Nov 2003 20:18:27 -0700
X-Trace: newsgroups.borland.com 1069301907 207.105.83.66 (19 Nov 2003 20:18:27 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail