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 butprocess
is not, returns time based onprocess.hrtime()
andprocess.uptime()
- If both of
window
andperformance
are defined, returnsperformance.now()
- Otherwise, it tries to return
Date.now()