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

Function diagnostics_wait_for_file

tests/test_diagnostics.c:64–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64static bool diagnostics_wait_for_file(const char *path, unsigned int timeout_ms) {
65 uint64_t deadline = cbm_now_ms() + timeout_ms;
66 while (cbm_now_ms() < deadline) {
67 if (cbm_file_exists(path)) {
68 return true;
69 }
70 diagnostics_wait_ms(10);
71 }
72 return cbm_file_exists(path);
73}
74
75static char *diagnostics_read_file(const char *path) {
76 FILE *file = cbm_fopen(path, "rb");

Callers 1

test_diagnostics.cFile · 0.85

Calls 3

cbm_now_msFunction · 0.85
cbm_file_existsFunction · 0.85
diagnostics_wait_msFunction · 0.85

Tested by

no test coverage detected