diff options
author | 2018-12-05 19:45:08 +0100 | |
---|---|---|
committer | 2018-12-05 19:45:08 +0100 | |
commit | 0bd02131b644b61088789f52f31b750c9aecaa6d (patch) | |
tree | 811c679a1bba8b24fc7967cdfe73640254d64156 /3rdparty/bx/src/timer.cpp | |
parent | 9a81ec7eaf00d73a23db5c003dc45b55d4b76c4a (diff) |
3rdparty: Updated bgfx, bimg, and bx to latest upstream. [Ryan Holtz]
Diffstat (limited to '3rdparty/bx/src/timer.cpp')
-rw-r--r-- | 3rdparty/bx/src/timer.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/3rdparty/bx/src/timer.cpp b/3rdparty/bx/src/timer.cpp index ad3bb1c32cb..8cfebdda7f5 100644 --- a/3rdparty/bx/src/timer.cpp +++ b/3rdparty/bx/src/timer.cpp @@ -1,12 +1,14 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bx#license-bsd-2-clause */ #include "bx_p.h" #include <bx/timer.h> -#if BX_PLATFORM_ANDROID +#if BX_CRT_NONE +# include "crt0.h" +#elif BX_PLATFORM_ANDROID # include <time.h> // clock, clock_gettime #elif BX_PLATFORM_EMSCRIPTEN # include <emscripten.h> @@ -20,12 +22,12 @@ 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; - // Performance counter value may unexpectedly leap forward - // http://support.microsoft.com/kb/274323 QueryPerformanceCounter(&li); int64_t i64 = li.QuadPart; #elif BX_PLATFORM_ANDROID @@ -47,7 +49,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; |