i have written a code to find the response time of a web page but it always
give 0 time .can someone plz complete this code to get the response time
mycode
import java.io.*;
import java.net.URL;
public class NewClass {
public static void main(String[] args) throws IOException {
long start = System.currentTimeMillis();
URL myURL = new URL("https://stackoverflow.com/");
long finish = System.currentTimeMillis();
long totalTime = finish - start;
System.out.println("Total Time for page load - "+totalTime);
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…