Linux.com

Author Message
Joined: Apr 02, 2008
Posts: 6
Other Topics
Posted Jul 14, 2008 at 8:12:13 AM
Subject: compute execution time?

HI,,,
is there a way to compute the execution time of a function (i am using Ubuntu8.04). e.g. below code compute the execution time of myFunc() ??


thanks

Back to top Profile Email Website
proopnarine

Joined Apr 03, 2008
Posts: 306
Location:San Francisco

Other Topics
Posted: Jul 15, 2008 7:20:14 AM
Subject: compute execution time?

Try the clock() function.
http://www.cplusplus.com/reference/clibrary/ctime/clock.html

Take the red pill www.calacademy.org/blogs

Back to top Profile Email Website
tophandcwby
Joined Apr 10, 2008
Posts: 41

Other Topics
Posted: Jul 23, 2008 12:03:47 PM
Subject: compute execution time?

Have a look at gprof, it is used for profiling code.

Back to top Profile Email Website
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya