Skip to content

Instantly share code, notes, and snippets.

@Woodsphreaker
Last active May 31, 2017 17:23
Show Gist options
  • Save Woodsphreaker/35fb61821c6835fbc06a865668f0ea7a to your computer and use it in GitHub Desktop.
Save Woodsphreaker/35fb61821c6835fbc06a865668f0ea7a to your computer and use it in GitHub Desktop.
timeTest
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