Article View: comp.os.os2.programmer
Article #2199Re: precise event timing?
From: ochealth
Date: Wed, 30 Sep 1992 06:05
Date: Wed, 30 Sep 1992 06:05
47 lines
2651 bytes
2651 bytes
In article <1992Sep27.002449.20479@unixg.ubc.ca> ochealth@unixg.ubc.ca (ochealth) writes:
>
>I have a program I'd like to write, and I want to know if it can be done:
This may help clarify what I want to do.
Basically, I need something like DosStartTimer(), but with smaller time
intervals (10-30 us long ticks). I also don't want to sue CLI to disable
interrupts (unless there's a way to prevent CLI wrecking file transfers,
etc.)
>
>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 ^^^
--
______________________________________________________________________________
jpm: ochealth@unixg.ubc.ca
Happily using OS/2 2.0 because MS Windows isNT ___
Insert VapourFeature ^^^
Technical Details
Message-ID:
<1992Sep30.060531.4050@unixg.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!ochealthReferences:
<1992Sep27.002449.20479@unixg.ubc.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!ochealth From: ochealth@unixg.ubc.ca (ochealth) Subject: Re: precise event timing? Message-ID: <1992Sep30.060531.4050@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 References: <1992Sep27.002449.20479@unixg.ubc.ca> Date: Wed, 30 Sep 1992 06:05:31 GMT Lines: 47