MCPcopy Create free account
hub / github.com/Kitware/CMake / uv__next_timeout

Function uv__next_timeout

Utilities/cmlibuv/src/timer.c:142–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141
142int uv__next_timeout(const uv_loop_t* loop) {
143 const struct heap_node* heap_node;
144 const uv_timer_t* handle;
145 uint64_t diff;
146
147 heap_node = heap_min(timer_heap(loop));
148 if (heap_node == NULL)
149 return -1; /* block indefinitely */
150
151 handle = container_of(heap_node, uv_timer_t, heap_node);
152 if (handle->timeout <= loop->time)
153 return 0;
154
155 diff = handle->timeout - loop->time;
156 if (diff > INT_MAX)
157 diff = INT_MAX;
158
159 return (int) diff;
160}
161
162
163void uv__run_timers(uv_loop_t* loop) {

Callers 2

uv__backend_timeoutFunction · 0.85
uv_backend_timeoutFunction · 0.85

Calls 1

timer_heapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…