move most old PIMap iterators to new
Documentation of PIVector, PIMap and PIMapIterator
This commit is contained in:
@@ -331,9 +331,10 @@ void PISystemMonitor::run() {
|
||||
tstat.cpu_load_system = piClampf(tstat.cpu_load_system, 0.f, 100.f);
|
||||
tstat.cpu_load_user = piClampf(tstat.cpu_load_user , 0.f, 100.f);
|
||||
|
||||
for (PIMap<llong, ThreadStats>::iterator i = cur_tm.begin(); i != cur_tm.end(); ++i) {
|
||||
auto i = cur_tm.makeIterator();
|
||||
while (i.next()) {
|
||||
if (!last_tm.contains(i.key())) continue;
|
||||
ThreadStats & ts_new(i.value());
|
||||
ThreadStats & ts_new(i.valueRef());
|
||||
ThreadStats & ts_old(last_tm[i.key()]);
|
||||
ts_new.cpu_load_kernel = calcThreadUsage(ts_new.kernel_time, ts_old.kernel_time);
|
||||
ts_new.cpu_load_user = calcThreadUsage(ts_new.user_time, ts_old.user_time);
|
||||
|
||||
Reference in New Issue
Block a user