summaryrefslogtreecommitdiff
path: root/src/core/core_timing.h
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-28 15:23:28 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:36:01 -0400
commitf5e32935ca9d1727624c86ca78aff91027caf819 (patch)
treea041186cd47fcea90880b300af3351a56fb819aa /src/core/core_timing.h
parentScheduler: Correct Reload/Unload (diff)
downloadyuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.gz
yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.xz
yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.zip
SingleCore: Use Cycle Timing instead of Host Timing.
Diffstat (limited to 'src/core/core_timing.h')
-rw-r--r--src/core/core_timing.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h
index 03f9a5c76..ed5de9b97 100644
--- a/src/core/core_timing.h
+++ b/src/core/core_timing.h
@@ -98,9 +98,15 @@ public:
98 /// We only permit one event of each type in the queue at a time. 98 /// We only permit one event of each type in the queue at a time.
99 void RemoveEvent(const std::shared_ptr<EventType>& event_type); 99 void RemoveEvent(const std::shared_ptr<EventType>& event_type);
100 100
101 void AddTicks(std::size_t core_index, u64 ticks); 101 void AddTicks(u64 ticks);
102 102
103 void ResetTicks(std::size_t core_index); 103 void ResetTicks();
104
105 void Idle();
106
107 s64 GetDowncount() const {
108 return downcount;
109 }
104 110
105 /// Returns current time in emulated CPU cycles 111 /// Returns current time in emulated CPU cycles
106 u64 GetCPUTicks() const; 112 u64 GetCPUTicks() const;
@@ -154,7 +160,9 @@ private:
154 160
155 bool is_multicore{}; 161 bool is_multicore{};
156 162
157 std::array<std::atomic<u64>, Core::Hardware::NUM_CPU_CORES> ticks_count{}; 163 /// Cycle timing
164 u64 ticks{};
165 s64 downcount{};
158}; 166};
159 167
160/// Creates a core timing event with the given name and callback. 168/// Creates a core timing event with the given name and callback.