mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-18 04:53:06 +01:00
crtnone: Timer.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user