MCPcopy Create free account
hub / github.com/devosoft/avida / UpdateRandomResources

Method UpdateRandomResources

avida-core/source/cpu/cTestCPU.cc:119–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void 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
126inline void cTestCPU::SetResourceUpdate(cAvidaContext& ctx, int update, bool round_to_closest)
127{

Callers

nothing calls this directly

Calls 2

GetConfigMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected