timing a function

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

 



Im looking to check the relative time it takes to call a function and then
return.  does anyone know how i can do this easily?  heres what im hoping
i can do...

int len;

len = check_timer();
function_to_time();
len = check_timer() - len;

and have this return some number telling me the relative time to execute
the function.  if this isnt clear let me know and ill clarify.  thank you
in advance!

Dan

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux