summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-08-03 17:12:52 +0200
committerLioncash <mathew1800@gmail.com>2020-08-03 17:12:55 +0200
commite1ab72a0eabff336b0f7a76410e64b7ed65269d8 (patch)
treee20db1ee75529fbc6b081640076b920b1b1fb589 /src
parentipc: Allow all trivially copyable objects to be passed directly into WriteBuffer (#4465) (diff)
downloadyuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.tar
yuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.tar.gz
yuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.tar.bz2
yuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.tar.lz
yuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.tar.xz
yuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.tar.zst
yuzu-e1ab72a0eabff336b0f7a76410e64b7ed65269d8.zip
Diffstat (limited to '')
-rw-r--r--src/tests/core/core_timing.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp
index 022b26e6d..b35459152 100644
--- a/src/tests/core/core_timing.cpp
+++ b/src/tests/core/core_timing.cpp
@@ -46,20 +46,16 @@ struct ScopeInit final {
Core::Timing::CoreTiming core_timing;
};
-#pragma optimize("", off)
-
u64 TestTimerSpeed(Core::Timing::CoreTiming& core_timing) {
- u64 start = core_timing.GetGlobalTimeNs().count();
- u64 placebo = 0;
+ const u64 start = core_timing.GetGlobalTimeNs().count();
+ volatile u64 placebo = 0;
for (std::size_t i = 0; i < 1000; i++) {
- placebo += core_timing.GetGlobalTimeNs().count();
+ placebo = placebo + core_timing.GetGlobalTimeNs().count();
}
- u64 end = core_timing.GetGlobalTimeNs().count();
- return (end - start);
+ const u64 end = core_timing.GetGlobalTimeNs().count();
+ return end - start;
}
-#pragma optimize("", on)
-
} // Anonymous namespace
TEST_CASE("CoreTiming[BasicOrder]", "[core]") {