[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: precision timer?



On Tue, 2003-07-01 at 17:26, Kevin Wooley wrote:
> Well, what I really care about is the time between system calls as long as the
> measurement is relatively accurate.  I don't care if the CPU goes off and does
> other things some times as long as the time keeps ticking away.
> 
> Am I correct in understanding that the bit of the kernel that supplies the time
> keeps ticking away (is this based on a hardware timer?), it's just when the CPU
> actually deals with the system call that changes?

Kevin,

Look at how do_gettimeofday is implemented. I don't know how this is
implemented on for the etrax. On 586+, do_gettimeofday returns a struct
with near microsecond resolution (dependent on clock rate).

Craig