summaryrefslogtreecommitdiff
path: root/src/core/core_timing.h
diff options
context:
space:
mode:
authorGravatar Lioncash2020-07-15 18:30:06 -0400
committerGravatar Lioncash2020-07-15 18:54:15 -0400
commit8b50c660dfce50a07c2b2aa3c1b6b8642259a944 (patch)
tree798b0427a660bf249311f3a13d96c6df69a6bcb5 /src/core/core_timing.h
parentMerge pull request #4342 from lioncash/endian (diff)
downloadyuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.gz
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.xz
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.zip
core_timing: Make use of std::chrono with ScheduleEvent
Diffstat (limited to 'src/core/core_timing.h')
-rw-r--r--src/core/core_timing.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h
index 72faaab64..9b9f18daf 100644
--- a/src/core/core_timing.h
+++ b/src/core/core_timing.h
@@ -62,7 +62,7 @@ public:
62 62
63 /// CoreTiming begins at the boundary of timing slice -1. An initial call to Advance() is 63 /// CoreTiming begins at the boundary of timing slice -1. An initial call to Advance() is
64 /// required to end slice - 1 and start slice 0 before the first cycle of code is executed. 64 /// required to end slice - 1 and start slice 0 before the first cycle of code is executed.
65 void Initialize(std::function<void(void)>&& on_thread_init_); 65 void Initialize(std::function<void()>&& on_thread_init_);
66 66
67 /// Tears down all timing related functionality. 67 /// Tears down all timing related functionality.
68 void Shutdown(); 68 void Shutdown();
@@ -95,8 +95,8 @@ public:
95 bool HasPendingEvents() const; 95 bool HasPendingEvents() const;
96 96
97 /// Schedules an event in core timing 97 /// Schedules an event in core timing
98 void ScheduleEvent(s64 ns_into_future, const std::shared_ptr<EventType>& event_type, 98 void ScheduleEvent(std::chrono::nanoseconds ns_into_future,
99 u64 userdata = 0); 99 const std::shared_ptr<EventType>& event_type, u64 userdata = 0);
100 100
101 void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, u64 userdata); 101 void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, u64 userdata);
102 102
@@ -161,7 +161,7 @@ private:
161 std::atomic<bool> wait_set{}; 161 std::atomic<bool> wait_set{};
162 std::atomic<bool> shutting_down{}; 162 std::atomic<bool> shutting_down{};
163 std::atomic<bool> has_started{}; 163 std::atomic<bool> has_started{};
164 std::function<void(void)> on_thread_init{}; 164 std::function<void()> on_thread_init{};
165 165
166 bool is_multicore{}; 166 bool is_multicore{};
167 167