summaryrefslogtreecommitdiffstats
path: root/src/Event.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-04-30 13:12:35 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2019-04-30 13:12:35 +0200
commit868ba6279a20e4d1412c2d576c67400167de6694 (patch)
treea7090b2da96987c4c532c5bedf812df20f604964 /src/Event.cpp
parentSecond iteration of changing to single-threaded model (diff)
downloadAltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar
AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.gz
AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.bz2
AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.lz
AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.xz
AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.tar.zst
AltCraft-868ba6279a20e4d1412c2d576c67400167de6694.zip
Diffstat (limited to 'src/Event.cpp')
-rw-r--r--src/Event.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Event.cpp b/src/Event.cpp
index 5c126bb..ea09af3 100644
--- a/src/Event.cpp
+++ b/src/Event.cpp
@@ -1,5 +1,7 @@
#include "Event.hpp"
+#include <optick.h>
+
std::list<EventListener*> EventSystem::listeners;
std::recursive_mutex EventSystem::listenersMutex;
@@ -14,6 +16,7 @@ EventListener::~EventListener() {
}
void EventListener::HandleEvent() {
+ OPTICK_EVENT();
if (!NotEmpty())
return;
@@ -27,6 +30,7 @@ void EventListener::HandleEvent() {
}
void EventListener::HandleAllEvents() {
+ OPTICK_EVENT();
if (!NotEmpty())
return;
@@ -54,6 +58,7 @@ void EventListener::RegisterHandler(size_t eventId, const EventListener::Handler
}
void EventListener::PollEvents() {
+ OPTICK_EVENT();
std::lock_guard<std::recursive_mutex> rawLock (rawEventsMutex);
if (rawEvents.empty())
return;