process.uptime()


process.uptime() 方法返回当前 Node.js 进程运行的秒数。

【The process.uptime() method returns the number of seconds the current Node.js process has been running.】

返回值包含秒的小数部分。使用 Math.floor() 可获得完整的秒数。

【The return value includes fractions of a second. Use Math.floor() to get whole seconds.】