24 &&
"Tried to scheduled the abortion of an event twice!");
31 &&
"Tried to abort an already aborted event!");
46 std::multimap<uint64, BasicEvent*>::iterator i;
53 if (event->IsRunning())
55 if (event->Execute(
m_time, p_time))
63 if (event->IsAbortScheduled())
70 if (event->IsDeletable())
87 if (!itr->second->IsAborted())
89 itr->second->SetAborted();
90 itr->second->Abort(
m_time);
95 if (!force && !itr->second->IsDeletable())
116 event->m_addTime =
m_time;
117 event->m_execTime = e_time.count();
118 m_events.insert(std::pair<uint64, BasicEvent*>(e_time.count(), event));
125 if (itr->second != event)
128 event->m_execTime = newTime.count();
130 m_events.insert(std::pair<uint64, BasicEvent*>(newTime.count(), event));
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::multimap< uint64, BasicEvent * > m_events
void KillAllEvents(bool force)
void Update(uint32 p_time)
void AddEvent(BasicEvent *event, Milliseconds e_time, bool set_addtime=true)
void ModifyEventTime(BasicEvent *event, Milliseconds newTime)
Milliseconds CalculateTime(Milliseconds t_offset) const