| 326 | #if defined(_MSC_VER) || defined(__MINGW32__) |
| 327 | static int64_t timer_freq, timer_start; |
| 328 | void ggml_time_init(void) { |
| 329 | LARGE_INTEGER t; |
| 330 | QueryPerformanceFrequency(&t); |
| 331 | timer_freq = t.QuadPart; |
| 332 | |
| 333 | // The multiplication by 1000 or 1000000 below can cause an overflow if timer_freq |
| 334 | // and the uptime is high enough. |
| 335 | // We subtract the program start time to reduce the likelihood of that happening. |
| 336 | QueryPerformanceCounter(&t); |
| 337 | timer_start = t.QuadPart; |
| 338 | } |
| 339 | int64_t ggml_time_ms(void) { |
| 340 | LARGE_INTEGER t; |
| 341 | QueryPerformanceCounter(&t); |
no outgoing calls