I have this code to get the current timestamp so that I can save it as a part of the key in leveldb database.
export default function timestamp() {
var [seconds, nanoseconds] = process.hrtime()
return seconds * 1000000000 + nanoseconds
}
I am wondering are there any downsides to use this function. Or are there any better alternatives to get current timestamp in node.