MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / stop_timer

Function stop_timer

external/ggml/src/ggml-virtgpu/virtgpu-utils.h:76–86  ·  view source on GitHub ↗

returns the duration in ns

Source from the content-addressed store, hash-verified

74
75// returns the duration in ns
76static inline long long stop_timer(timer_data * timer) {
77 timespec ts;
78 clock_gettime(CLOCK_MONOTONIC, &ts);
79 long long timer_end = (long long) ts.tv_sec * 1000000000LL + ts.tv_nsec;
80
81 long long duration = (timer_end - timer->start);
82 timer->total += duration;
83 timer->count += 1;
84
85 return duration;
86}

Callers 1

remote_callFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected