| 263 | |
| 264 | #ifdef _WIN32 |
| 265 | int cbm_clock_gettime(int clk_id, struct timespec *tp) { |
| 266 | (void)clk_id; |
| 267 | LARGE_INTEGER freq, count; |
| 268 | QueryPerformanceFrequency(&freq); |
| 269 | QueryPerformanceCounter(&count); |
| 270 | tp->tv_sec = (time_t)(count.QuadPart / freq.QuadPart); |
| 271 | tp->tv_nsec = (long)((count.QuadPart % freq.QuadPart) * 1000000000LL / freq.QuadPart); |
| 272 | return 0; |
| 273 | } |
| 274 | #endif |
| 275 | |
| 276 | /* ── getline (Windows lacks it) ───────────────────────────────── */ |
no outgoing calls