How can I get the most accurate time stamp in Node.js?
ps My version of Node.js is 0.8.X and the node-microtime extension doesn\'t work for me (crash on install)
new Date().getTime()? This gives you a timestamp in milliseconds, which is the most accurate that JS will give you.
Update: As stated by vaughan, process.hrtime() is available within Node.js - its resolution are nanoseconds and therefore its much higher, also this doesn't mean it has to be more exact.
PS.: Just to be clearer, process.hrtime() returns you a tuple Array containing the current high-resolution real time in a [seconds, nanoseconds]