In this code we can calculate the time span between two events in different case.
We can use two different timers to find response time, if we want to find the response time of a page load we can use two variables start time and end time. most probably the start time belongs to be system time System.currentTimeMillis() or server time.
long startTime = System.currentTimeMillis();
new WebDriverWait(driver, 10).until(ExpectedConditions.
long endTime = System.currentTimeMillis();
long totalTime = endTime - startTime;
System.out.println("Total Page Load Time: " + totalTime + "
Though this is not a perfect approach, it will give us a good measure of the page load time.