Finding function run time in C/C++

Status
Not open for further replies.

ThinkFree

Technomancer
How can I find the time taken by a function during function executiong? time_t and clock function give time in mili second range, but I want time in micro/nano second range as using these time comes out to be 0. The only solution I could find was making a loop run a large number of time and dividing total time by that number, which I want to avoid. Can anyone help?
 

dheeraj_kumar

Legen-wait for it-dary!
Read:

*www.devx.com/cplus/Article/35375/1954

if you are using visual c++,

*www.codeproject.com/KB/system/timers_intro.aspx
 
Status
Not open for further replies.
Top Bottom