Possible Duplicate:
How do I time a method's execution in Java?
I would like to know what the code would be to find how much time a function takes to execute till its last statement starting from the first.Suppose my function is like this:
public void sum(int a,int b)
{
int c;
c=a+b;
System.out.print(c);
}
Please insert the necessary code into the above function itself. Will be very helpful.