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