zalia64 17 Newbie Poster

I need to synchronize "Real-World" with a Window process. That is, the Windows operates a camera and shoot an image every xx milli-seconds, using a very accurate timer. In order to synchronise those images with the outside world, I want to time-stamp when some trigger happens and causes an interrupt.
This means that the interrupt-handler will have to read the internal 3-GigaHerz clock and store the value for later use.

In DOS, or Linux, this whole time-stamp process takes less then 5 nano-seconds:
" STI , push EAX, push EDX, RDTSC , mov STORAGE,EAX , mov STORAGE+4, EDX , pop EDX, pop EAX, RTI "

Under Windows, the response to an interrupt is unpredictable, with up to 5-10 milli-seconds lag.

Inside a Windows program, one can use RDTSC (read internal clock counter) to benchmark code snippets with 1 Giga resolution.
But calling ANY interrupt is performed with very,very large overhead.

Do You Know how to overcome that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.