0

hiiii

is their any special functin available to calculate the execution time of a program written in java.??

thanks in advance..

3
Contributors
4
Replies
8
Views
8 Years
Discussion Span
Last Post by verruckt24
0

System.currentTimeMillis(); It returns the current time in milliseconds. So you can call this method before the java method you want to count and then call it again and get the difference

0

If it is profiling that you need to do on your program/application and not only the overall time required for execution, I would suggest you to use the profiling tool accompanied with modern day IDEs such as NetBeans. But if it is just the overall execution time that you require more of a ballpark then what javaAddict mentions should more than suffice your need.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.