MCPcopy Index your code
hub / github.com/git/git / force_last_update

Function force_last_update

progress.c:332–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332static 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
350static void log_trace2(struct progress *progress)
351{

Callers 1

stop_progress_msgFunction · 0.85

Calls 4

progress_getnanotimeFunction · 0.85
throughput_stringFunction · 0.85
xstrfmtFunction · 0.85
displayFunction · 0.85

Tested by

no test coverage detected