| 292 | |
| 293 | #ifdef _WIN32 |
| 294 | int cbm_clock_gettime(int clk_id, struct timespec *tp) { |
| 295 | (void)clk_id; |
| 296 | LARGE_INTEGER freq, count; |
| 297 | QueryPerformanceFrequency(&freq); |
| 298 | QueryPerformanceCounter(&count); |
| 299 | tp->tv_sec = (time_t)(count.QuadPart / freq.QuadPart); |
| 300 | tp->tv_nsec = (long)((count.QuadPart % freq.QuadPart) * 1000000000LL / freq.QuadPart); |
| 301 | return 0; |
| 302 | } |
| 303 | #endif |
| 304 | |
| 305 | /* ── getline (Windows lacks it) ───────────────────────────────── */ |
no outgoing calls