LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
LinkBack Search this Thread
Old 10-25-2004, 12:52 AM   #1
saajii
Member
 
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
Kumar
Member
 
Registered: Sep 2003
Location: Pune, India
Distribution: Red Hat
Posts: 106

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


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 09:41 PM.

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