diff options
author | Carbenium <carbenium@outlook.com> | 2020-07-25 23:51:30 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-24 12:06:56 +0100 |
commit | a7cbb16229cb48057fd8ef38b6db205beeb30b4e (patch) | |
tree | 9b6dc7ce0a9f0ebbdaf26cfdac2e2c2c814e7687 /src/common/Utilities/EventProcessor.cpp | |
parent | eeffb310de3f91a1c456a3c118eb01311557a00b (diff) |
Core/EventProcessor: std::chrono-ify the remaining public API
(cherry picked from commit 1d8782e3566393f71fbc091de57c96a9a15972cb)
Diffstat (limited to 'src/common/Utilities/EventProcessor.cpp')
-rw-r--r-- | src/common/Utilities/EventProcessor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<uint64, BasicEvent*>(e_time, event)); + event->m_execTime = e_time.count(); + m_events.insert(std::pair<uint64, BasicEvent*>(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<uint64, BasicEvent*>(newTime, event)); + m_events.insert(std::pair<uint64, BasicEvent*>(newTime.count(), event)); break; } } |