MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_time_init

Function ggml_time_init

subprojects/llama.cpp/ggml/src/ggml.c:513–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511#if defined(_MSC_VER) || defined(__MINGW32__)
512static int64_t timer_freq, timer_start;
513void ggml_time_init(void) {
514 LARGE_INTEGER t;
515 QueryPerformanceFrequency(&t);
516 timer_freq = t.QuadPart;
517
518 // The multiplication by 1000 or 1000000 below can cause an overflow if timer_freq
519 // and the uptime is high enough.
520 // We subtract the program start time to reduce the likelihood of that happening.
521 QueryPerformanceCounter(&t);
522 timer_start = t.QuadPart;
523}
524int64_t ggml_time_ms(void) {
525 LARGE_INTEGER t;
526 QueryPerformanceCounter(&t);

Callers 7

mainFunction · 0.85
llama_backend_initFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
ggml_initFunction · 0.85
ggml_opt_fitFunction · 0.85

Calls

no outgoing calls

Tested by 2

mainFunction · 0.68
mainFunction · 0.68