| 80 | }; |
| 81 | |
| 82 | static long scale_elapsed_us(const struct timespec *start) { |
| 83 | struct timespec now; |
| 84 | cbm_clock_gettime(CLOCK_MONOTONIC, &now); |
| 85 | return ((long)(now.tv_sec - start->tv_sec) * PROF_US_PER_SEC) + |
| 86 | ((now.tv_nsec - start->tv_nsec) / PROF_NS_PER_US); |
| 87 | } |
| 88 | |
| 89 | void cbm_scale_begin(cbm_scale_probe_t *probe, const char *phase, long total) { |
| 90 | if (!probe) { |
no test coverage detected