| 257 | } |
| 258 | |
| 259 | static struct progress *start_progress_delay(struct repository *r, |
| 260 | const char *title, uint64_t total, |
| 261 | unsigned delay, unsigned sparse) |
| 262 | { |
| 263 | struct progress *progress = xmalloc(sizeof(*progress)); |
| 264 | progress->repo = r; |
| 265 | progress->title = title; |
| 266 | progress->total = total; |
| 267 | progress->last_value = -1; |
| 268 | progress->last_percent = -1; |
| 269 | progress->delay = delay; |
| 270 | progress->sparse = sparse; |
| 271 | progress->throughput = NULL; |
| 272 | progress->start_ns = getnanotime(); |
| 273 | strbuf_init(&progress->counters_sb, 0); |
| 274 | progress->title_len = utf8_strwidth(title); |
| 275 | progress->split = 0; |
| 276 | set_progress_signal(); |
| 277 | trace2_region_enter("progress", title, r); |
| 278 | return progress; |
| 279 | } |
| 280 | |
| 281 | static int get_default_delay(void) |
| 282 | { |
no test coverage detected