[lkml]   [2005]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to measure time accurately.
krishna wrote:
> Hi All,
> Can any one tell me how to measure time accurately for a block of C code
> in device drivers.
> For example, If I want to measure the time duration of firmware download.

Most cpus have some way of getting at a counter or decrementer of
various frequencies. Usually it requires low-level hardware knowledge
and often it needs assembly code.

On ppc you'd use the mftbu/mftbl instructions, as suggested by Lee on
x86 you'd use the rdtsc instruction.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-04-06 13:31    [W:0.106 / U:2.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site