I want to log my page's perceived loading time(the milliseconds from the user refresh the page to the custom-finish-loading event).
somehow, I can get the custom-finish-loading event. in the event handler I want to log the elapsed time from "the time when user refreshing the page" to the "current time". something like:
document.on("custom-finish-loading", function() {
console.log(getElapsedTimeFromRefreshingPage());
});
I want to know if the browser provide such a function like getElapsedTimeFromRefreshingPage() to get the elapsed time from refreshing the page?