Re: Measuring time in range of microseconds.

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

Hello Satish,

On Wed, Dec 7, 2011 at 12:41 PM, Sathishkumar Duraisamy
<bewithsathish@xxxxxxxxx> wrote:
> Hi Fredrick,
> On Wed, Dec 7, 2011 at 8:12 AM, Fredrick <fjohnber@xxxxxxxx> wrote:
>> I think if the specific ARM platform you are working supports a oneshot
>> clock_device, you would get the high res timer support.
>> You can check for clock_devices defined in your platform having feature -
My guess is that u want to measure the time taken to execute a
function in microseconds.
something like

for this i use  something like this declare
struct timeval tv in your function

and insert printk statements before and after calling to your function

 printk ("Before  %s (): Sec = %d    micro Sec = %d\n", __FUNCTION__,
tv.tv_sec, tv.tv_usec);
 printk ("After %s (): Sec = %d    micro Sec = %d\n", __FUNCTION__,
tv.tv_sec, tv.tv_usec);

Warm Regards,
Ravi .
"I don't Know is not a excuse , its an opportunity."

Kernelnewbies mailing list

[Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Networking]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux