Subject: Re: [linux-audio-dev] best method for timing
From: Juan Linietsky (coding_AT_reduz.com.ar)
Date: Wed Apr 17 2002 - 04:49:25 EEST
On Wed, 17 Apr 2002 01:14:28 +0200 (CEST)
Tim Goetze <tim_AT_quitte.de> wrote:
> xk wrote:
>
> >In Windows I use the rdtsc assembler instruction. It returns a 64 bit
> >integer (in EAX:EDX I think) which represent the amount of processors cycles
> >that have passed from the last reset. Computing the difference between two
> >values and taking into account the freq of the CPU (you have to figure it
> >out somehow), you get a very accurate timer.
>
> are you trying to fool somebody into writing a sequencer clock that
> busy-waits on the cycle counter?
>
I think he meant using it for measuring the time between calls,
in unixes we have gettimeofday for this, but in windows there isnt really any way to do it, since there's no way to get high res timing beyond 10ms.
Juan Linietsky
This archive was generated by hypermail 2b28 : Wed Apr 17 2002 - 04:34:33 EEST