[fpc-pascal] Microsecond Delay Suggestions?
James Richters
james at productionautomation.net
Tue Jul 26 18:38:07 CEST 2016
I don’t need a 55mS tick, there was a DOS timer that ticked every 55mS, which I used to calibrate a delayloop.. however I can’t use any of that on windows, I can’t even make the DOS function call, and even if I had a way to calibrate my delay loop, it would be meaningless because I have to share the processor with windows, so creating a delay by just looping a lot doesn’t work at all in windows… depending on what else is running I would get totally different time delays out of the loop.
What I need is a timer that I can specify in microseconds, a millisecond is too long. I am using it for timing to read in a string on a serial connection. My fastest baudrate is 250000, so at that rate I would need to delay only 36 microseconds. So I can’t use sleep () or delay () because they only go down to 1mS and that’s too slow.
From: fpc-pascal-bounces at lists.freepascal.org [mailto:fpc-pascal-bounces at lists.freepascal.org] On Behalf Of Dmitry Boyarintsev
Sent: Tuesday, July 26, 2016 11:19 AM
To: FPC-Pascal users discussions <fpc-pascal at lists.freepascal.org>
Subject: Re: [fpc-pascal] Microsecond Delay Suggestions?
On Tue, Jul 26, 2016 at 11:16 AM, James Richters <james at productionautomation.net <mailto:james at productionautomation.net> > wrote:
Any suggestions on how to do this on windows with a console application?
I don't have an answer, but I'm wondering what kind of task is that?
Why do you need this 55mS tick?
thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160726/f224233d/attachment.html>
More information about the fpc-pascal
mailing list