add add() method
This commit is contained in:
parent
90ad5a74f2
commit
f67401d7ae
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue