From 52e35f45b4cfefc21707b42883dd1afa142ac7d4 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Sat, 22 Nov 2025 15:09:21 +0000 Subject: New upstream version 6.0.25.12+repack --- compatbits.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'compatbits.c') diff --git a/compatbits.c b/compatbits.c index f93b2e5..a6ce8f5 100644 --- a/compatbits.c +++ b/compatbits.c @@ -25,6 +25,8 @@ Stuff to make compiling on WINDOWS and LINUX easier #ifdef WIN32 +#include + typedef unsigned int uint32_t; #define pthread_t uint32_t @@ -41,6 +43,7 @@ int pthread_equal(pthread_t T1, pthread_t T2) #include #include #include +#include #define BOOL int @@ -188,3 +191,27 @@ void closesocket(int sock) } #endif + +#ifdef WIN32 + +uint32_t GetTickCountINP3() +{ + // Returns system uptime in 10 mS, lower 20 bits only + + return (GetTickCount() / 10) & 0xfffff; +} +#else + +uint64_t GetTickCount(); + +uint32_t GetTickCountINP3() +{ + uint64_t Ticks = GetTickCount(); + + // Returns system uptime in 10 mS, lower 20 bits only + + return (Ticks / 10) & 0xfffff; +} + +#endif + -- cgit v1.2.3