summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-07-16 00:30:06 +0200
committerLioncash <mathew1800@gmail.com>2020-07-16 00:54:15 +0200
commit8b50c660dfce50a07c2b2aa3c1b6b8642259a944 (patch)
tree798b0427a660bf249311f3a13d96c6df69a6bcb5 /src/tests
parentMerge pull request #4342 from lioncash/endian (diff)
downloadyuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.gz
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.bz2
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.lz
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.xz
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.tar.zst
yuzu-8b50c660dfce50a07c2b2aa3c1b6b8642259a944.zip
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/core/core_timing.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp
index e66db1940..4ede1bc2e 100644
--- a/src/tests/core/core_timing.cpp
+++ b/src/tests/core/core_timing.cpp
@@ -116,13 +116,16 @@ TEST_CASE("CoreTiming[BasicOrderNoPausing]", "[core]") {
expected_callback = 0;
- u64 start = core_timing.GetGlobalTimeNs().count();
- u64 one_micro = 1000U;
+ const u64 start = core_timing.GetGlobalTimeNs().count();
+ const u64 one_micro = 1000U;
+
for (std::size_t i = 0; i < events.size(); i++) {
- u64 order = calls_order[i];
- core_timing.ScheduleEvent(i * one_micro + 100U, events[order], CB_IDS[order]);
+ const u64 order = calls_order[i];
+ const auto future_ns = std::chrono::nanoseconds{static_cast<s64>(i * one_micro + 100)};
+ core_timing.ScheduleEvent(future_ns, events[order], CB_IDS[order]);
}
- u64 end = core_timing.GetGlobalTimeNs().count();
+
+ const u64 end = core_timing.GetGlobalTimeNs().count();
const double scheduling_time = static_cast<double>(end - start);
const double timer_time = static_cast<double>(TestTimerSpeed(core_timing));