summaryrefslogtreecommitdiff
path: root/src/common/wall_clock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/wall_clock.h')
-rw-r--r--src/common/wall_clock.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h
index 367d72134..5db30083d 100644
--- a/src/common/wall_clock.h
+++ b/src/common/wall_clock.h
@@ -14,24 +14,24 @@ namespace Common {
14class WallClock { 14class WallClock {
15public: 15public:
16 /// Returns current wall time in nanoseconds 16 /// Returns current wall time in nanoseconds
17 virtual std::chrono::nanoseconds GetTimeNS() = 0; 17 [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0;
18 18
19 /// Returns current wall time in microseconds 19 /// Returns current wall time in microseconds
20 virtual std::chrono::microseconds GetTimeUS() = 0; 20 [[nodiscard]] virtual std::chrono::microseconds GetTimeUS() = 0;
21 21
22 /// Returns current wall time in milliseconds 22 /// Returns current wall time in milliseconds
23 virtual std::chrono::milliseconds GetTimeMS() = 0; 23 [[nodiscard]] virtual std::chrono::milliseconds GetTimeMS() = 0;
24 24
25 /// Returns current wall time in emulated clock cycles 25 /// Returns current wall time in emulated clock cycles
26 virtual u64 GetClockCycles() = 0; 26 [[nodiscard]] virtual u64 GetClockCycles() = 0;
27 27
28 /// Returns current wall time in emulated cpu cycles 28 /// Returns current wall time in emulated cpu cycles
29 virtual u64 GetCPUCycles() = 0; 29 [[nodiscard]] virtual u64 GetCPUCycles() = 0;
30 30
31 virtual void Pause(bool is_paused) = 0; 31 virtual void Pause(bool is_paused) = 0;
32 32
33 /// Tells if the wall clock, uses the host CPU's hardware clock 33 /// Tells if the wall clock, uses the host CPU's hardware clock
34 bool IsNative() const { 34 [[nodiscard]] bool IsNative() const {
35 return is_native; 35 return is_native;
36 } 36 }
37 37
@@ -47,7 +47,7 @@ private:
47 bool is_native; 47 bool is_native;
48}; 48};
49 49
50std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency, 50[[nodiscard]] std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency,
51 u32 emulated_clock_frequency); 51 u32 emulated_clock_frequency);
52 52
53} // namespace Common 53} // namespace Common