add add() method

This commit is contained in:
Doug MacEachern 2005-03-09 19:09:21 +00:00
parent 90ad5a74f2
commit f67401d7ae
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,13 @@ public class CpuTimer {
this.cpuSys = 0; this.cpuSys = 0;
} }
public void add(CpuTimer timer) {
this.cpuTotal += timer.cpuTotal;
this.cpuUser += timer.cpuUser;
this.cpuSys += timer.cpuSys;
this.totalTime += timer.totalTime;
}
public void start() { public void start() {
this.startTime = System.currentTimeMillis(); this.startTime = System.currentTimeMillis();