summaryrefslogtreecommitdiffstats
path: root/src/common/wall_clock.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-14 15:38:45 +0200
committerLioncash <mathew1800@gmail.com>2020-08-15 23:17:52 +0200
commitdf7248039553b3ebd338380c3ef0428b0e046e79 (patch)
treeeca7153300e311ac7954f5c085fdada0c7295699 /src/common/wall_clock.h
parentMerge pull request #4526 from lioncash/core-semi (diff)
downloadyuzu-df7248039553b3ebd338380c3ef0428b0e046e79.tar
yuzu-df7248039553b3ebd338380c3ef0428b0e046e79.tar.gz
yuzu-df7248039553b3ebd338380c3ef0428b0e046e79.tar.bz2
yuzu-df7248039553b3ebd338380c3ef0428b0e046e79.tar.lz
yuzu-df7248039553b3ebd338380c3ef0428b0e046e79.tar.xz
yuzu-df7248039553b3ebd338380c3ef0428b0e046e79.tar.zst
yuzu-df7248039553b3ebd338380c3ef0428b0e046e79.zip
Diffstat (limited to '')
-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 {
class WallClock {
public:
/// Returns current wall time in nanoseconds
- virtual std::chrono::nanoseconds GetTimeNS() = 0;
+ [[nodiscard]] virtual std::chrono::nanoseconds GetTimeNS() = 0;
/// Returns current wall time in microseconds
- virtual std::chrono::microseconds GetTimeUS() = 0;
+ [[nodiscard]] virtual std::chrono::microseconds GetTimeUS() = 0;
/// Returns current wall time in milliseconds
- virtual std::chrono::milliseconds GetTimeMS() = 0;
+ [[nodiscard]] virtual std::chrono::milliseconds GetTimeMS() = 0;
/// Returns current wall time in emulated clock cycles
- virtual u64 GetClockCycles() = 0;
+ [[nodiscard]] virtual u64 GetClockCycles() = 0;
/// Returns current wall time in emulated cpu cycles
- virtual u64 GetCPUCycles() = 0;
+ [[nodiscard]] virtual u64 GetCPUCycles() = 0;
virtual void Pause(bool is_paused) = 0;
/// Tells if the wall clock, uses the host CPU's hardware clock
- bool IsNative() const {
+ [[nodiscard]] bool IsNative() const {
return is_native;
}
@@ -47,7 +47,7 @@ private:
bool is_native;
};
-std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency,
- u32 emulated_clock_frequency);
+[[nodiscard]] std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency,
+ u32 emulated_clock_frequency);
} // namespace Common