Mail Archives: djgpp/2004/10/25/12:33:00
On Saturday 23 October 2004 23:15, Jason Mills wrote:
> Does anyone have any suggestions as too what time functions
> can be safely called inside an interrupt handler? I
> need something with a resolution of > 80ms. Basically,
> I need a time stamp of when the IRS is called.
>
> I used uclock() originally, but I think it's causing
> some problems in other parts of my code. I'm aware of the
> other timing functions, but which one is "safest" to call
> inside the ISR? Is there a better way to get a time stamp
> inside an ISR then calling something like uclock().
If You are using CPU which supports rdtsr instruction (Intel Pentium and
above and some others support), then try to use it. Of course You need
to know CPU clock frequency, but normally it's not difficult to get.
Andris
- Raw text -