Last active
March 6, 2023 03:15
-
-
Save dbwodlf3/3d0b247fc57d2e219daca73368dfc07a to your computer and use it in GitHub Desktop.
check performance
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
const INIT_TIME = new Date().getTime(); | |
const _t = _ => console.log(`${new Date().getTime() - INIT_TIME}ms`); | |
_t(); | |
// Browser | |
const INIT_TIME = performance.now(); | |
const _t = _ => console.log(`${performance.now() - INIT_TIME}ms`); | |
_t(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment