| 407 | #ifdef _WIN32 |
| 408 | #include <windows.h> |
| 409 | static mi_msecs_t mi_to_msecs(LARGE_INTEGER t) { |
| 410 | static LARGE_INTEGER mfreq; // = 0 |
| 411 | if (mfreq.QuadPart == 0LL) { |
| 412 | LARGE_INTEGER f; |
| 413 | QueryPerformanceFrequency(&f); |
| 414 | mfreq.QuadPart = f.QuadPart/1000LL; |
| 415 | if (mfreq.QuadPart == 0) mfreq.QuadPart = 1; |
| 416 | } |
| 417 | return (mi_msecs_t)(t.QuadPart / mfreq.QuadPart); |
| 418 | } |
| 419 | |
| 420 | mi_msecs_t _mi_clock_now(void) { |
| 421 | LARGE_INTEGER t; |