crtnone: Timer.

This commit is contained in:
Branimir Karadžić
2018-04-25 21:03:10 -07:00
parent 7a05d19352
commit 4cd413f678

View File

@@ -6,7 +6,9 @@
#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,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;