Created
April 10, 2020 13:22
-
-
Save Caballerog/41f65bbb17f24243cca55c1ed2a59d64 to your computer and use it in GitHub Desktop.
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 measureTime = (cb, ...args) => { | |
const t0 = performance.now(); | |
cb(...args); | |
const t1 = performance.now(); | |
console.log('Call to doSomething took ' + (t1 - t0) + ' milliseconds.'); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment