MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / runtime_wait_tick

Function runtime_wait_tick

src/daemon/runtime.c:265–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265static void runtime_wait_tick(uint64_t deadline_ms) {
266 uint64_t now_ms = cbm_now_ms();
267 if (now_ms >= deadline_ms) {
268 return;
269 }
270 uint64_t remaining_ms = deadline_ms - now_ms;
271 struct timespec pause = {
272 .tv_sec = 0,
273 .tv_nsec = remaining_ms > 1 ? RUNTIME_WAIT_POLL_NS : (long)(remaining_ms * 1000000ULL),
274 };
275 (void)cbm_nanosleep(&pause, NULL);
276}
277
278static void runtime_put_u32(uint8_t *out, uint32_t value) {
279 out[0] = (uint8_t)(value >> 24);

Callers 3

runtime_accept_loopFunction · 0.85
runtime_wait_for_countFunction · 0.85

Calls 2

cbm_now_msFunction · 0.85
cbm_nanosleepFunction · 0.85

Tested by

no test coverage detected