0.1.0 • Published 6 years ago

nanouptime v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

nanouptime

Get the time since your app is started

What it does

We have performance.now() in browsers but we have not it in Node.js. So that package implements that function with 3 ways:

  • If window is undefined but process is not, returns time based on process.hrtime() and process.uptime()
  • If both of window and performance are defined, returns performance.now()
  • Otherwise, it tries to return Date.now()

License

MIT