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

Function runtime_wait_tick

src/daemon/runtime.c:372–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372static void runtime_wait_tick(uint64_t deadline_ms) {
373 uint64_t now_ms = cbm_now_ms();
374 if (now_ms >= deadline_ms) {
375 return;
376 }
377 uint64_t remaining_ms = deadline_ms - now_ms;
378 struct timespec pause = {
379 .tv_sec = 0,
380 .tv_nsec = remaining_ms > 1 ? RUNTIME_WAIT_POLL_NS : (long)(remaining_ms * 1000000ULL),
381 };
382 (void)cbm_nanosleep(&pause, NULL);
383}
384
385static void runtime_put_u32(uint8_t *out, uint32_t value) {
386 out[0] = (uint8_t)(value >> 24);

Calls 2

cbm_now_msFunction · 0.85
cbm_nanosleepFunction · 0.85

Tested by

no test coverage detected