- xbt_dict_foreach(surf_model_resource_set(surf_cpu_model), cursor, key, cpu){
- if (smaller < 0){
- smaller = cpu->last_update;
- continue;
- }
- if (cpu->last_update < smaller){
- smaller = cpu->last_update;
- }
- }
+ xbt_lib_foreach(host_lib, cursor, key, data){
+ if(data[SURF_CPU_LEVEL]){
+ cpu = data[SURF_CPU_LEVEL];
+ if (smaller < 0){
+ smaller = cpu->last_update;
+ continue;
+ }
+ if (cpu->last_update < smaller){
+ smaller = cpu->last_update;
+ }
+ }
+ }