Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-25-2004, 12:52 AM   #1
Registered: Sep 2003
Location: sydney
Distribution: Redhat 8.0
Posts: 36

Rep: Reputation: 15
timing a function

hey guys;

i have just written a function in a kernel module and i would like to time the function in order to do a performance analysis under different situation.

i was wondering if there is a function for getting the current time in kernel modules. then i can call that function before and after the function is executed and calculate the time for the function.
Old 10-25-2004, 02:37 AM   #2
Registered: Sep 2003
Location: Pune, India
Distribution: Red Hat
Posts: 106

Rep: Reputation: 15
try using the sys_gettimeofday routine or the jiffies variable which can give you the time in sec elapsed since booting.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mencoder timing delos Linux - Software 1 09-27-2004 02:24 PM
timing function calls in C? (recvfrom() on Pentium II) pingswept Programming 4 05-24-2004 07:55 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
timing in c++ deveraux83 Programming 2 04-20-2004 05:34 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 12:21 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration