|
62 | 62 | #include <time.h> |
63 | 63 | #include <unistd.h> |
64 | 64 | #include "decision-timing.h" |
| 65 | +#include "gcc-attributes.h" |
65 | 66 | #include "message.h" |
66 | 67 | #include "paths.h" |
67 | 68 |
|
@@ -265,6 +266,17 @@ static atomic_bool missing_helper_driver_logged; |
265 | 266 |
|
266 | 267 | __thread struct decision_timing_context decision_timing_tls; |
267 | 268 |
|
| 269 | +static const char *format_report_time(long when, char *buf, size_t buf_len) |
| 270 | + __attr_access ((__write_only__, 2, 3)); |
| 271 | +static void format_count(unsigned long long value, char *buf, size_t buf_len) |
| 272 | + __attr_access ((__write_only__, 2, 3)); |
| 273 | +static void format_scaled_time(double value, const char *unit, char *buf, |
| 274 | + size_t buf_len) __attr_access ((__write_only__, 3, 4)); |
| 275 | +static void format_human_duration(unsigned long long ns, char *buf, |
| 276 | + size_t buf_len) __attr_access ((__write_only__, 2, 3)); |
| 277 | +static void format_hms_duration(unsigned long long ns, char *buf, |
| 278 | + size_t buf_len) __attr_access ((__write_only__, 2, 3)); |
| 279 | + |
268 | 280 | /* |
269 | 281 | * ns_now - read monotonic time in nanoseconds. |
270 | 282 | * Returns monotonic nanoseconds, or 0 if the clock cannot be read. |
|
0 commit comments