summaryrefslogtreecommitdiffstats
path: root/src/tests/core
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2022-07-10 07:59:40 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2022-07-10 07:59:40 +0200
commit240650f6a6336df8d3eb11b410cdcd332d8ad562 (patch)
tree16ae249e6160a22f88bd2238d43b23079c4afb44 /src/tests/core
parentMerge pull request #8531 from FernandoS27/core-timing-fix-reg (diff)
downloadyuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar
yuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar.gz
yuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar.bz2
yuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar.lz
yuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar.xz
yuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.tar.zst
yuzu-240650f6a6336df8d3eb11b410cdcd332d8ad562.zip
Diffstat (limited to 'src/tests/core')
-rw-r--r--src/tests/core/core_timing.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp
index e687416a8..894975e6f 100644
--- a/src/tests/core/core_timing.cpp
+++ b/src/tests/core/core_timing.cpp
@@ -9,6 +9,7 @@
#include <cstdlib>
#include <memory>
#include <mutex>
+#include <optional>
#include <string>
#include "core/core.h"
@@ -25,13 +26,15 @@ u64 expected_callback = 0;
std::mutex control_mutex;
template <unsigned int IDX>
-void HostCallbackTemplate(std::uintptr_t user_data, std::chrono::nanoseconds ns_late) {
+std::optional<std::chrono::nanoseconds> HostCallbackTemplate(std::uintptr_t user_data, s64 time,
+ std::chrono::nanoseconds ns_late) {
std::unique_lock<std::mutex> lk(control_mutex);
static_assert(IDX < CB_IDS.size(), "IDX out of range");
callbacks_ran_flags.set(IDX);
REQUIRE(CB_IDS[IDX] == user_data);
delays[IDX] = ns_late.count();
++expected_callback;
+ return std::nullopt;
}
struct ScopeInit final {