process.threadCpuUsage([previousValue])


process.threadCpuUsage() 方法返回当前工作线程的用户和系统 CPU 时间使用情况,在具有属性 usersystem 的对象中,其值是微秒值(百万分之一秒)。

¥The process.threadCpuUsage() method returns the user and system CPU time usage of the current worker thread, in an object with properties user and system, whose values are microsecond values (millionth of a second).

先前调用 process.threadCpuUsage() 的结果可以作为参数传给函数,以获取差异读数。

¥The result of a previous call to process.threadCpuUsage() can be passed as the argument to the function, to get a diff reading.