Skip to content

Instantly share code, notes, and snippets.

@jkantr
Created March 5, 2018 17:36
Show Gist options
  • Save jkantr/bbf117c06fdbfdd705c545b63e12421c to your computer and use it in GitHub Desktop.
Save jkantr/bbf117c06fdbfdd705c545b63e12421c to your computer and use it in GitHub Desktop.
module.exports = {
startTimer() {
return process.hrtime()
},
stopTimer(timer) {
const [s, ns] = process.hrtime(timer)
return ((s * 1e9) + ns) / 1e6
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment