MCPcopy Create free account
hub / github.com/defold/defold / GetAliveTimers

Function GetAliveTimers

engine/script/src/script_timer.cpp:400–414  ·  view source on GitHub ↗

For testing

Source from the content-addressed store, hash-verified

398
399 // For testing
400 uint32_t GetAliveTimers(HTimerWorld timer_world)
401 {
402 assert(timer_world != 0x0);
403
404 uint32_t alive_timers = 0u;
405 uint32_t size = timer_world->m_Instances.Size();
406 for (uint32_t i = 0; i < size; ++i)
407 {
408 uint16_t index = timer_world->m_Instances[i]; // the pool indices
409 Timer* timer = GetTimerFromIndex(timer_world, index);
410
411 alive_timers += timer->m_IsAlive != 0 ? 1 : 0;
412 }
413 return alive_timers;
414 }
415
416 static void SetTimerWorld(HScriptWorld script_world, HTimerWorld timer_world)
417 {

Callers 1

TEST_FFunction · 0.85

Calls 3

GetTimerFromIndexFunction · 0.85
assertFunction · 0.50
SizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.68