Created
August 27, 2022 21:47
-
-
Save geraldotech/1d012d99b88ac5e9eb2202e3eff2355a to your computer and use it in GitHub Desktop.
LoadTime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loadTime = function(){ | |
setTimeout(function(){ | |
var perfData = window.performance.timing; | |
var EstimatedTime = (perfData.loadEventEnd - perfData.navigationStart); | |
console.clear(); | |
console.log(EstimatedTime); | |
console.log(EstimatedTime+" milliseconds"); | |
console.log("Start: "+perfData.navigationStart); | |
console.log("End: "+perfData.loadEventEnd); | |
console.log(JSON.stringify(perfData)); | |
},10); | |
}; | |
loadTime(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment