| ... | ... | @@ -70,8 +70,7 @@ typedef SSIZE_T ssize_t; |
| 70 | 70 | #endif |
| 71 | 71 | |
| 72 | 72 | #if defined(ZIG_OS_WINDOWS) |
| 73 | | static double win32_time_resolution; |
| 74 | | static LARGE_INTEGER windows_perf_freq; |
| 73 | static uint64_t windows_perf_freq; |
| 75 | 74 | #elif defined(__MACH__) |
| 76 | 75 | static clock_serv_t macos_calendar_clock; |
| 77 | 76 | static clock_serv_t macos_monotonic_clock; |
| ... | ... | @@ -1269,8 +1268,8 @@ OsTimeStamp os_timestamp_calendar(void) { |
| 1269 | 1268 | OsTimeStamp os_timestamp_monotonic(void) { |
| 1270 | 1269 | OsTimeStamp result; |
| 1271 | 1270 | #if defined(ZIG_OS_WINDOWS) |
| 1272 | | LARGE_INTEGER counts; |
| 1273 | | QueryPerformanceCounter(&counts); |
| 1271 | uint64_t counts; |
| 1272 | QueryPerformanceCounter((LARGE_INTEGER*)&counts); |
| 1274 | 1273 | result.sec = counts / windows_perf_freq; |
| 1275 | 1274 | result.nsec = (counts % windows_perf_freq) * 1000000000u / windows_perf_freq; |
| 1276 | 1275 | #elif defined(__MACH__) |
| ... | ... | @@ -1386,9 +1385,7 @@ int os_init(void) { |
| 1386 | 1385 | #if defined(ZIG_OS_WINDOWS) |
| 1387 | 1386 | _setmode(fileno(stdout), _O_BINARY); |
| 1388 | 1387 | _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)) { |
| 1392 | 1389 | return ErrorSystemResources; |
| 1393 | 1390 | } |
| 1394 | 1391 | #elif defined(__MACH__) |