Measuring time in range of microseconds.

Peter Senna Tschudin peter.senna at gmail.com
Tue Dec 6 05:46:41 EST 2011


Hi Sathishkumar,

I've used RDTSC instruction as precision timer. RDTSC measures clock cycles.

Example on:
petersenna.com/files/rdtscbench-1.0.tar.gz

More about rdtsc:
http://en.wikipedia.org/wiki/Time_Stamp_Counter
http://people.virginia.edu/~chg5w/page3/assets/MeasuringUnix.pdf

Regards,

Peter

On Tue, Dec 6, 2011 at 6:47 AM, Sathishkumar Duraisamy
<bewithsathish at gmail.com> wrote:
> Hi,
>
> I am writing a module to measure time taken between two events. I have
> to measure time in microseconds. Some articles says about High
> resolution timers. As per the article
> http://elinux.org/High_Resolution_Timers, I read cat /proc/timer_list
> which says 10000000ns as resolution ( which is 10ms). I think with
> this resolution I cannot measure in the range of microseconds. I
> couldn't able to find support for HR timer in kernel menuconfig.
>
> I am using kernel 2.6.36.2. Can you please help me to, "How do enable
> this timer. Or is there any other means to measure time or simply I
> have to use the timer hardware directly?"
>
> --
> With Thanks,
> Sathishkumar D
> http://flowersopenlab.weebly.com/
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter Senna Tschudin
peter.senna at gmail.com
gpg id: 48274C36



More information about the Kernelnewbies mailing list