[SIGAR-19] change process cpu time units to milliseconds

This commit is contained in:
Doug MacEachern committed 2006-12-04 03:42:27 +00:00
1 parent 4e45608ce0
commit 795fa1ae44
7 files changed
+20 -15

No files matched your search

@@ -52,7 +52,7 @@ public class ProcCpu extends ProcTime {
ptable.put(cpu, cpu);
}
long timeNow = System.currentTimeMillis() / 1000; //seconds
long timeNow = System.currentTimeMillis();
double diff = timeNow - cpu.lastTime;
if (diff == 0) {
return cpu; //we were just called within < 1 second ago.
@@ -149,7 +149,7 @@ public class Ps extends SigarCommandBase {
}
public static String getCpuTime(ProcTime time) {
long t = time.getTotal();
long t = time.getTotal() / 1000;
return t/60 + ":" + t%60;
}