Skip to content

Commit

Permalink
Fix elapsed and timestamp calculation on Linux
Browse files Browse the repository at this point in the history
Fix #80
  • Loading branch information
filipesilva committed Aug 31, 2018
1 parent e5e2b01 commit 081984a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/procfile.js
Expand Up @@ -112,8 +112,8 @@ function readProcFile (pid, options, done) {
cpu: cpu,
memory: memory,
ctime: (stat.utime + stat.stime) / cpuInfo.clockTick,
elapsed: date - (stat.start * 1000),
timestamp: stat.start * 1000, // start date
elapsed: (stat.uptime * 1000) - (stat.start * 1000), // process uptime minus start time
timestamp: date,
pid: pid,
ppid: stat.ppid
})
Expand Down

0 comments on commit 081984a

Please sign in to comment.