aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-07 10:54:13 -0500
committerGitHub <noreply@github.com>2023-03-07 10:54:13 -0500
commita7792e5ff83523142230951ac7eacbd7685dc40b (patch)
treea7531c65e2ddec1122fc071d44c8106c48352ce3 /src/core/core_timing.h
parent6d61430311d57fa4338bcf33cdcbb04a9a2f16c4 (diff)
parent376a414f5bc6d27e5e0fbda323caf5520436bf39 (diff)
Merge pull request #9889 from Morph1984/time-is-ticking
core_timing: Reduce CPU usage on Windows
Diffstat (limited to 'src/core/core_timing.h')
-rw-r--r--src/core/core_timing.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h
index da366637b..4b89c0c39 100644
--- a/src/core/core_timing.h
+++ b/src/core/core_timing.h
@@ -122,6 +122,9 @@ public:
/// Returns current time in emulated in Clock cycles
u64 GetClockTicks() const;
+ /// Returns current time in nanoseconds.
+ std::chrono::nanoseconds GetCPUTimeNs() const;
+
/// Returns current time in microseconds.
std::chrono::microseconds GetGlobalTimeUs() const;
@@ -139,7 +142,8 @@ private:
void Reset();
- std::unique_ptr<Common::WallClock> clock;
+ std::unique_ptr<Common::WallClock> cpu_clock;
+ std::unique_ptr<Common::WallClock> event_clock;
s64 global_timer = 0;