Article View: borland.public.cppbuilder.nativeapi
Article #12759Re: Sleep( ) differences in Win98 and WinXP?
From: Nicholas Gessler
Date: Thu, 20 Nov 2003 05:07
Date: Thu, 20 Nov 2003 05:07
25 lines
1935 bytes
1935 bytes
"Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> wrote:
>I know nothing about stepper motors.
Allow me to explain:
To simplify, let's just say that the stepper motor turns
1/360th of a full revolution (one step) every time it
gets a WriteFile() message over COM1.
If I send out 360 WriteFile() messages per second,
the motor will turn at 1 revolution per second.
If I send out 720 per WriteFile() messages per second,
the motor will turn at 2 revolutions per second.
If I send out 180 WriteFile() messages per second,
the motor will turn 1 revolution every 2 seconds.
So I can vary the speed of the motor by varying the
time intervals between sending WriteFile() messages.
Sleep() in Win98 seems to be adjustable from 1-10 ms.
Sleep() in WinXP seems to bottom out at 10ms.
So I need a way to adjust these intervals smoothly in
the range of 1-10 ms. I'm guessing that the Timer Component
cannot slice time that precisely.
Technical Details
Message-ID:
<3fbc5a0b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fbc4093$1@newsgroups.borland.com> <3fbc4bcd$1@newsgroups.borland.com> <3fbc4e30@newsgroups.borland.com> <3fbc537f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,a735156abe5db193 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-11-19 22:09:09 PST From: "Nicholas Gessler" <gessler@ucla.edu> Sender: "Nicholas Gessler" <gessler@ucla.edu> Reply-To: "Nicholas Gessler" <gessler@ucla.edu> Subject: Re: Sleep( ) differences in Win98 and WinXP? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 4.60.102.178 References: <3fbc4093$1@newsgroups.borland.com> <3fbc4bcd$1@newsgroups.borland.com> <3fbc4e30@newsgroups.borland.com> <3fbc537f$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <3fbc5a0b$1@newsgroups.borland.com> Date: 19 Nov 2003 22:07:07 -0700 X-Trace: newsgroups.borland.com 1069308427 207.105.83.66 (19 Nov 2003 22:07:07 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail