From a7cbb16229cb48057fd8ef38b6db205beeb30b4e Mon Sep 17 00:00:00 2001 From: Carbenium Date: Sat, 25 Jul 2020 23:51:30 +0200 Subject: Core/EventProcessor: std::chrono-ify the remaining public API (cherry picked from commit 1d8782e3566393f71fbc091de57c96a9a15972cb) --- src/common/Utilities/EventProcessor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/common/Utilities/EventProcessor.cpp') diff --git a/src/common/Utilities/EventProcessor.cpp b/src/common/Utilities/EventProcessor.cpp index e48b622822d..3789810787d 100644 --- a/src/common/Utilities/EventProcessor.cpp +++ b/src/common/Utilities/EventProcessor.cpp @@ -110,24 +110,24 @@ void EventProcessor::KillAllEvents(bool force) m_events.clear(); } -void EventProcessor::AddEvent(BasicEvent* event, uint64 e_time, bool set_addtime) +void EventProcessor::AddEvent(BasicEvent* event, Milliseconds e_time, bool set_addtime) { if (set_addtime) event->m_addTime = m_time; - event->m_execTime = e_time; - m_events.insert(std::pair(e_time, event)); + event->m_execTime = e_time.count(); + m_events.insert(std::pair(e_time.count(), event)); } -void EventProcessor::ModifyEventTime(BasicEvent* event, uint64 newTime) +void EventProcessor::ModifyEventTime(BasicEvent* event, Milliseconds newTime) { for (auto itr = m_events.begin(); itr != m_events.end(); ++itr) { if (itr->second != event) continue; - event->m_execTime = newTime; + event->m_execTime = newTime.count(); m_events.erase(itr); - m_events.insert(std::pair(newTime, event)); + m_events.insert(std::pair(newTime.count(), event)); break; } } -- cgit v1.2.3