Article View: comp.os.os2.programmer
Article #2140precise event timing?
From: ochealth
Date: Sun, 27 Sep 1992 00:24
Date: Sun, 27 Sep 1992 00:24
30 lines
1858 bytes
1858 bytes
I have a program I'd like to write, and I want to know if it can be done:
I need to write to a port every 10-30 us or so (smaller is better)
worst case. Writes to the port may not be necessary every time.
Is there a good way to generate a timing signal that would wake up
a thread, so it could perform the write? Keep in mind the 20 microsecond
or so needed between every signal. It should be fairly accurate, but the
exact value doesn't matter much. Ie 20 us vs. 25 us is no big deal, it
just has to stay that value.
I don't want to turn off interrupts either. Other than writing to the port,
it won't be doing a lot of work. It shouldn't hog the CPU too much.
I also don't want the built in timer and mouse interrupts etc. to mess things
up. I don't mind disabling interrupts, but only if it won't interfere with
normal OS/2 operation.
Is this possible under "mission critical OS/2"? All I need is a few CPU
cycles, but I need them scheduled accurately!
thanks for the help.
BTW, I looked at hrtimer.sys, which has enough resolution, but it looks
like I'd have to poll it, and I don't want to take too much CPU time.
--
______________________________________________________________________________
jpm: ochealth@unixg.ubc.ca
Happily using OS/2 2.0 because MS Windows isNT ___
Insert VapourFeature ^^^
Technical Details
Message-ID:
<1992Sep27.002449.20479@unixg.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!destroyer!ubc-cs!unixg.ubc.ca!ochealthShow Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!destroyer!ubc-cs!unixg.ubc.ca!ochealth From: ochealth@unixg.ubc.ca (ochealth) Subject: precise event timing? Message-ID: <1992Sep27.002449.20479@unixg.ubc.ca> Sender: news@unixg.ubc.ca (Usenet News Maintenance) Nntp-Posting-Host: unixg.ubc.ca Organization: University of British Columbia, Vancouver, B.C., Canada Date: Sun, 27 Sep 1992 00:24:49 GMT Lines: 30