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;