Last active
May 31, 2017 17:23
-
-
Save Woodsphreaker/35fb61821c6835fbc06a865668f0ea7a to your computer and use it in GitHub Desktop.
timeTest
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 initTime = (id) => console.time(id) | |
const endTime = (id) => console.timeEnd(id) | |
const testTime = (delay, id) => { | |
initTime(id) | |
setTimeout(() => endTime(id), delay) | |
} | |
testTime(3000, "T0") | |
testTime(2000, "T1") | |
testTime(1000, "T2") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment