aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.h
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-01-14 15:48:01 -0500
committerLiam <byteslice@airmail.cc>2023-01-14 15:48:01 -0500
commite1b0b3d0db58560c62f00f7a8fe9337872027d7c (patch)
treeb6f1f24811fd7be52276794b9fd45cc1f01f7cf4 /src/core/core_timing.h
parentc45b1d872341e0ccd422f73e586c27c87aa5c43d (diff)
timing: wait for completion on unregister
Diffstat (limited to 'src/core/core_timing.h')
-rw-r--r--src/core/core_timing.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h
index b5925193c7..da366637be 100644
--- a/src/core/core_timing.h
+++ b/src/core/core_timing.h
@@ -98,10 +98,13 @@ public:
const std::shared_ptr<EventType>& event_type,
std::uintptr_t user_data = 0, bool absolute_time = false);
- void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, std::uintptr_t user_data);
+ void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, std::uintptr_t user_data,
+ bool wait = true);
- /// We only permit one event of each type in the queue at a time.
- void RemoveEvent(const std::shared_ptr<EventType>& event_type);
+ void UnscheduleEventWithoutWait(const std::shared_ptr<EventType>& event_type,
+ std::uintptr_t user_data) {
+ UnscheduleEvent(event_type, user_data, false);
+ }
void AddTicks(u64 ticks_to_add);