Thursday 20 April 2017

Is process.hrtime() suitable for monitoring uptime?

I am trying to monitor the uptime and send data at high frequency on node.js server. The server will broadcast network data every few milliseconds.

But using Date.now() is not accurate enough. So I am thinking off using the high resolution timer process.hrtime(). I don't know what is the max value of process.hrtime. I need to run the server for at least 6 months up. Will it overflow very soon?



via newguy

No comments:

Post a Comment