Created
May 13, 2019 14:03
-
-
Save donatoaguirre24/cd508ff64fa8f3cb28ca939042fcfab2 to your computer and use it in GitHub Desktop.
Log the execution time of a certain portion of code
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
const tick = Date.now(); | |
// the code goes here | |
const log = tick => console.log(`Elapsed: ${Date.now() - tick}ms`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment