| 1 | // Copyright 2007 - 2021, Alan Antonuk and the rabbitmq-c contributors. |
| 2 | // SPDX-License-Identifier: mit |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | #include <windows.h> |
| 7 | |
| 8 | uint64_t now_microseconds(void) { |
| 9 | FILETIME ft; |
| 10 | GetSystemTimeAsFileTime(&ft); |
| 11 | return (((uint64_t)ft.dwHighDateTime << 32) | (uint64_t)ft.dwLowDateTime) / |
| 12 | 10; |
| 13 | } |
| 14 | |
| 15 | void microsleep(int usec) { Sleep(usec / 1000); } |