summaryrefslogtreecommitdiff
path: root/src/core/core_timing.h
diff options
context:
space:
mode:
authorGravatar liamwhite2023-07-02 17:38:28 -0400
committerGravatar GitHub2023-07-02 17:38:28 -0400
commit95ceae40e6f4806a1bf00913315ed22bd2842854 (patch)
treee1054aaadcfd0db9904835a3bf6ab80bf37d673c /src/core/core_timing.h
parentMerge pull request #10479 from GPUCode/format-list (diff)
parentcore_timing: Remove GetCurrentTimerResolution in CoreTiming loop (diff)
downloadyuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.gz
yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.xz
yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.zip
Merge pull request #10998 from Morph1984/qt-stop-messing-with-me
core_timing: Remove GetCurrentTimerResolution in CoreTiming loop
Diffstat (limited to 'src/core/core_timing.h')
-rw-r--r--src/core/core_timing.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h
index 10db1de55..5bca1c78d 100644
--- a/src/core/core_timing.h
+++ b/src/core/core_timing.h
@@ -131,6 +131,10 @@ public:
131 /// Checks for events manually and returns time in nanoseconds for next event, threadsafe. 131 /// Checks for events manually and returns time in nanoseconds for next event, threadsafe.
132 std::optional<s64> Advance(); 132 std::optional<s64> Advance();
133 133
134#ifdef _WIN32
135 void SetTimerResolutionNs(std::chrono::nanoseconds ns);
136#endif
137
134private: 138private:
135 struct Event; 139 struct Event;
136 140
@@ -143,6 +147,10 @@ private:
143 147
144 s64 global_timer = 0; 148 s64 global_timer = 0;
145 149
150#ifdef _WIN32
151 s64 timer_resolution_ns;
152#endif
153
146 // The queue is a min-heap using std::make_heap/push_heap/pop_heap. 154 // The queue is a min-heap using std::make_heap/push_heap/pop_heap.
147 // We don't use std::priority_queue because we need to be able to serialize, unserialize and 155 // We don't use std::priority_queue because we need to be able to serialize, unserialize and
148 // erase arbitrary events (RemoveEvent()) regardless of the queue order. These aren't 156 // erase arbitrary events (RemoveEvent()) regardless of the queue order. These aren't