Comparing version 2.0.15 to 2.0.16
@@ -9,8 +9,8 @@ 'use strict' | ||
function parseTime (timestr, fraction) { | ||
function parseTime (timestr, centisec) { | ||
var time = 0 | ||
var tpart = timestr.split(/-|:|\./) | ||
var i = tpart.length - 1 | ||
if (i >= 0 && fraction && PLATFORM === 'darwin') { // Fractions of second | ||
time += parseInt(tpart[i--], 10) * 600 | ||
if (i >= 0 && centisec && PLATFORM === 'darwin') { | ||
time += parseInt(tpart[i--], 10) * 10 | ||
} | ||
@@ -74,3 +74,3 @@ if (i >= 0) { // Seconds | ||
// RSS: is counted as blocks of 1024 bytes | ||
// TIME: format is [[dd-]hh:]ss:mm.pp (pp is the percentage of a minute) | ||
// TIME: format is [[dd-]hh:]mm:ss.cc (cc are centiseconds) | ||
// %CPU: goes from 0 to vcore * 100 | ||
@@ -77,0 +77,0 @@ // |
{ | ||
"name": "pidusage", | ||
"version": "2.0.15", | ||
"version": "2.0.16", | ||
"description": "Cross-platform process cpu % and memory usage of a PID", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28205