I have been trying to profile code by putting in timing function at the start and end of the function(a function may call some other function and so on ) just before the return statement if the function returns something. The time is calculated in milliseconds.
I wanted to know if this is correct way of finding out how much time a function takes to execute . Is this correct ? The code to be profiled is in C .