| 117 | } |
| 118 | |
| 119 | void cTestCPU::UpdateRandomResources(cAvidaContext& ctx, int cpu_cycles_used) |
| 120 | { |
| 121 | int ave_time_slice = m_world->GetConfig().AVE_TIME_SLICE.Get(); |
| 122 | if ((m_res_method >= RES_UPDATED_DEPLETABLE) && (cpu_cycles_used % ave_time_slice == 0)) |
| 123 | SetResourceUpdate(ctx, m_res_update + 1, true); |
| 124 | } |
| 125 | |
| 126 | inline void cTestCPU::SetResourceUpdate(cAvidaContext& ctx, int update, bool round_to_closest) |
| 127 | { |