| 330 | } |
| 331 | |
| 332 | static void force_last_update(struct progress *progress, const char *msg) |
| 333 | { |
| 334 | char *buf; |
| 335 | struct throughput *tp = progress->throughput; |
| 336 | |
| 337 | if (tp) { |
| 338 | uint64_t now_ns = progress_getnanotime(progress); |
| 339 | unsigned int misecs, rate; |
| 340 | misecs = ((now_ns - progress->start_ns) * 4398) >> 32; |
| 341 | rate = tp->curr_total / (misecs ? misecs : 1); |
| 342 | throughput_string(&tp->display, tp->curr_total, rate); |
| 343 | } |
| 344 | progress_update = 1; |
| 345 | buf = xstrfmt(", %s.\n", msg); |
| 346 | display(progress, progress->last_value, buf); |
| 347 | free(buf); |
| 348 | } |
| 349 | |
| 350 | static void log_trace2(struct progress *progress) |
| 351 | { |
no test coverage detected