Mail Archives: djgpp/2002/09/19/09:52:26
> > > As you will see from the sources, uclock issues an Int 2Fh call, which
> > > might not be a good idea in an interrupt handler. I'd suggest to take
> > > that call out of the code and see if that helps.
> >
> > I specifically checked the source for uclock() and I found no such
interrupt
> >
> > being issued. Am I missing something?
>
> You are missing the fact that __dpmi_yield issues Int 2Fh.
Ahhhhh, I see. Thanks for the input. Here's what I have done to get around
the problem:
At startup, I spend one second and use uclock() together with the RDTSC
macro (read
time stamp counter) to quite accurately calculate the processor speed. I
then use RDTSC any time I need a precise time within my interrupt handler.
This seems
to work very well (with the added benefit that RDTSC is significantly faster
than
uclock()).
Do you see any problems with this approach?
- Raw text -