Answers for "how can we check the time of execution of java program"

1

java execution time

long start = System.currentTimeMillis();
class.method();
long time = System.currentTimeMillis() - start;
Posted by: Guest on January-15-2021
1

java execution time

long startTime = System.nanoTime();
myCall(); 
long stopTime = System.nanoTime();
System.out.println(stopTime - startTime);
Posted by: Guest on March-02-2022

Code answers related to "how can we check the time of execution of java program"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language