diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-03-28 20:23:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-06-27 17:36:01 +0200 |
commit | f5e32935ca9d1727624c86ca78aff91027caf819 (patch) | |
tree | a041186cd47fcea90880b300af3351a56fb819aa /src/core/core_timing.h | |
parent | Scheduler: Correct Reload/Unload (diff) | |
download | yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.gz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.bz2 yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.lz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.xz yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.tar.zst yuzu-f5e32935ca9d1727624c86ca78aff91027caf819.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core_timing.h | 14 |
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: /// We only permit one event of each type in the queue at a time. void RemoveEvent(const std::shared_ptr<EventType>& event_type); - void AddTicks(std::size_t core_index, u64 ticks); + void AddTicks(u64 ticks); - void ResetTicks(std::size_t core_index); + void ResetTicks(); + + void Idle(); + + s64 GetDowncount() const { + return downcount; + } /// Returns current time in emulated CPU cycles u64 GetCPUTicks() const; @@ -154,7 +160,9 @@ private: bool is_multicore{}; - std::array<std::atomic<u64>, Core::Hardware::NUM_CPU_CORES> ticks_count{}; + /// Cycle timing + u64 ticks{}; + s64 downcount{}; }; /// Creates a core timing event with the given name and callback. |