Created
January 10, 2023 16:02
-
-
Save TorbjornHoltmon/15a3c92246446d2a913f5e3525674402 to your computer and use it in GitHub Desktop.
perfomance
This file contains 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
let startTime = Date.now(); | |
const prestand = () => { | |
const result = Date.now() - startTime; | |
startTime = Date.now(); | |
return `${result} ms`; | |
}; | |
let startTime = performance.now(); | |
const prestand2 = () => { | |
const result = performance.now() - startTime; | |
startTime = performance.now(); | |
return `${result} ms`; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment