From 4cd413f678dd48f8f8db0574afe15054c7ce7653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Wed, 25 Apr 2018 21:03:10 -0700 Subject: [PATCH] crtnone: Timer. --- src/timer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/timer.cpp b/src/timer.cpp index 6fda9d8..7bfb573 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -6,7 +6,9 @@ #include "bx_p.h" #include -#if BX_PLATFORM_ANDROID +#if BX_CRT_NONE +# include "crt0.h" +#elif BX_PLATFORM_ANDROID # include // clock, clock_gettime #elif BX_PLATFORM_EMSCRIPTEN # include @@ -20,7 +22,9 @@ namespace bx { int64_t getHPCounter() { -#if BX_PLATFORM_WINDOWS \ +#if BX_CRT_NONE + int64_t i64 = crt0::getHPCounter(); +#elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT LARGE_INTEGER li; @@ -47,7 +51,9 @@ namespace bx int64_t getHPFrequency() { -#if BX_PLATFORM_WINDOWS \ +#if BX_CRT_NONE + return INT64_C(1000000000); +#elif BX_PLATFORM_WINDOWS \ || BX_PLATFORM_XBOXONE \ || BX_PLATFORM_WINRT LARGE_INTEGER li;