authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:35:04-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-03-11 10:35:04-04:00
log895fab156a83e7a71487388dfa22743aa54c4b7e
treefa7f14994c761c759e5792a10162159446516b9c
parent3a6f19de48366a616eaffd9dd6c4d4712e0b6c27

fix build on windows


1 files changed, 4 insertions(+), 7 deletions(-)

src/os.cpp+4-7
......@@ -70,8 +70,7 @@ typedef SSIZE_T ssize_t;
7070#endif
7171
7272#if defined(ZIG_OS_WINDOWS)
73static double win32_time_resolution;
74static LARGE_INTEGER windows_perf_freq;
73static uint64_t windows_perf_freq;
7574#elif defined(__MACH__)
7675static clock_serv_t macos_calendar_clock;
7776static clock_serv_t macos_monotonic_clock;
......@@ -1269,8 +1268,8 @@ OsTimeStamp os_timestamp_calendar(void) {
12691268OsTimeStamp os_timestamp_monotonic(void) {
12701269 OsTimeStamp result;
12711270#if defined(ZIG_OS_WINDOWS)
1272 LARGE_INTEGER counts;
1273 QueryPerformanceCounter(&counts);
1271 uint64_t counts;
1272 QueryPerformanceCounter((LARGE_INTEGER*)&counts);
12741273 result.sec = counts / windows_perf_freq;
12751274 result.nsec = (counts % windows_perf_freq) * 1000000000u / windows_perf_freq;
12761275#elif defined(__MACH__)
......@@ -1386,9 +1385,7 @@ int os_init(void) {
13861385#if defined(ZIG_OS_WINDOWS)
13871386 _setmode(fileno(stdout), _O_BINARY);
13881387 _setmode(fileno(stderr), _O_BINARY);
1389 if (QueryPerformanceFrequency(&windows_perf_freq)) {
1390 win32_time_resolution = 1.0 / (double) windows_perf_freq;
1391 } else {
1388 if (!QueryPerformanceFrequency((LARGE_INTEGER*)&windows_perf_freq)) {
13921389 return ErrorSystemResources;
13931390 }
13941391#elif defined(__MACH__)