mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-12 17:38:19 +00:00
[host] fix windows compilation with mingw clang
This commit is contained in:
parent
128a8938c6
commit
646f5b1be8
@ -39,7 +39,7 @@ typedef struct LGTimer LGTimer;
|
|||||||
static inline uint64_t microtime(void)
|
static inline uint64_t microtime(void)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
static LARGE_INTEGER freq = { 0 };
|
static LARGE_INTEGER freq = { .QuadPart = 0LL };
|
||||||
if (!freq.QuadPart)
|
if (!freq.QuadPart)
|
||||||
QueryPerformanceFrequency(&freq);
|
QueryPerformanceFrequency(&freq);
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ static inline uint64_t nanotime(void)
|
|||||||
static double multiplier = 0.0;
|
static double multiplier = 0.0;
|
||||||
if (!multiplier)
|
if (!multiplier)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER freq = { 0 };
|
LARGE_INTEGER freq = { .QuadPart = 0LL };
|
||||||
QueryPerformanceFrequency(&freq);
|
QueryPerformanceFrequency(&freq);
|
||||||
multiplier = 1e9 / freq.QuadPart;
|
multiplier = 1e9 / freq.QuadPart;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user