Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cputime

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cputime - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

10

lib/main.js

@@ -23,3 +23,5 @@ // Generated by CoffeeScript 1.8.0

module.exports.includeChildProcesses = false;
/*

@@ -46,3 +48,3 @@ @param {Number} [pid] Process ID.

return fs.readFile("/proc/" + pid + "/stat", "ascii", function(err, data) {
var parts;
var parts, time;
if (err) {

@@ -52,3 +54,7 @@ return done(err);

parts = data.split(' ');
return done(null, (parseInt(parts[13]) + parseInt(parts[14])) / CLK_TCK);
time = parseInt(parts[13]) + parseInt(parts[14]);
if (module.exports.includeChildProcesses) {
time += parseInt(parts[15]) + parseInt(parts[16]);
}
return done(null, time / CLK_TCK);
});

@@ -55,0 +61,0 @@ case 'darwin':

2

package.json

@@ -12,3 +12,3 @@ {

],
"version": "0.1.3",
"version": "0.2.0",
"main": "index.js",

@@ -15,0 +15,0 @@ "repository": {

@@ -23,2 +23,6 @@ # node-cputime [![Dependency Status](https://david-dm.org/patriksimek/cputime.png)](https://david-dm.org/patriksimek/cputime) [![NPM version](https://badge.fury.io/js/cputime.png)](http://badge.fury.io/js/cputime)

## Options
`cput.includeChildProcesses` - Default: `false`. Doesn't work on Windows and OS X.
<a name="license" />

@@ -25,0 +29,0 @@ ## License

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc