add getter for user and sys combined

This commit is contained in:
Doug MacEachern 2004-08-10 04:06:41 +00:00
parent 5edf8ab64a
commit 28b71f3651
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ public class CpuPerc {
this.idle = idle;
}
public double getCombined() {
return this.user + this.sys;
}
public static String format(double val) {
String p = String.valueOf(val * 100.0);
//cant wait for sprintf.