From 7c578c216167e22f2f80fd42f77ede8af40a4335 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Mon, 2 Mar 2026 21:49:26 -0600 Subject: [PATCH] feat: stub `QueryPerformance{Counter, Frequency}` --- Minecraft.Client/Linux/LinuxStubs.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Minecraft.Client/Linux/LinuxStubs.h b/Minecraft.Client/Linux/LinuxStubs.h index 2e16db67d..31273cac8 100644 --- a/Minecraft.Client/Linux/LinuxStubs.h +++ b/Minecraft.Client/Linux/LinuxStubs.h @@ -520,4 +520,21 @@ static inline BOOL FindClose(HANDLE hFindFile) return TRUE; } +BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency) +{ + // nanoseconds + lpFrequency->QuadPart = (1000000000); + return false; +} + +static inline BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount) +{ + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + + lpPerformanceCount->QuadPart = (ts.tv_sec * 1000000000LL) + ts.tv_nsec; + + return true; +} + #endif // LINUXSTUBS_H \ No newline at end of file