MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / KillTimer

Method KillTimer

core/TimerSys.cpp:379–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void TimerSystem::KillTimer(ITimer *pTimer)
380{
381 if (pTimer->m_KillMe)
382 {
383 return;
384 }
385
386 if (pTimer->m_InExec)
387 {
388 pTimer->m_KillMe = true;
389 return;
390 }
391
392 pTimer->m_InExec = true; /* The timer it's not really executed but this check needs to be done */
393 pTimer->m_Listener->OnTimerEnd(pTimer, pTimer->m_pData);
394
395 if (pTimer->m_Flags & TIMER_FLAG_REPEAT)
396 {
397 m_LoopTimers.remove(pTimer);
398 } else {
399 m_SingleTimers.remove(pTimer);
400 }
401
402 m_FreeTimers.push(pTimer);
403}
404
405CStack<ITimer *> s_tokill;
406void TimerSystem::RemoveMapChangeTimers()

Callers 7

EndVotingMethod · 0.80
OnHandleDestroyMethod · 0.80
smn_CreateTimerFunction · 0.80
smn_KillTimerFunction · 0.80
OnClientVoiceMethod · 0.80
OnClientDisconnectingMethod · 0.80
ProcessVoiceDataMethod · 0.80

Calls 3

OnTimerEndMethod · 0.45
removeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected