| 327 | |
| 328 | #ifdef _WIN32 |
| 329 | int cbm_clock_gettime(int clk_id, struct timespec *tp) { |
| 330 | (void)clk_id; |
| 331 | LARGE_INTEGER freq, count; |
| 332 | QueryPerformanceFrequency(&freq); |
| 333 | QueryPerformanceCounter(&count); |
| 334 | tp->tv_sec = (time_t)(count.QuadPart / freq.QuadPart); |
| 335 | tp->tv_nsec = (long)((count.QuadPart % freq.QuadPart) * 1000000000LL / freq.QuadPart); |
| 336 | return 0; |
| 337 | } |
| 338 | #endif |
| 339 | |
| 340 | /* ── Per-thread CPU time ──────────────────────────────────────── */ |
no outgoing calls