Junio C Hamano | e0173ad | 2007-04-28 23:38:52 -0700 | [diff] [blame] | 1 | #ifndef PROGRESS_H |
| 2 | #define PROGRESS_H |
Ævar Arnfjörð Bjarmason | 74900a6 | 2022-02-03 22:40:18 +0100 | [diff] [blame] | 3 | #include "gettext.h" |
Nicolas Pitre | 96a02f8 | 2007-04-18 14:27:45 -0400 | [diff] [blame] | 4 | |
Nicolas Pitre | dc6a075 | 2007-10-30 14:57:32 -0400 | [diff] [blame] | 5 | struct progress; |
Nicolas Pitre | 96a02f8 | 2007-04-18 14:27:45 -0400 | [diff] [blame] | 6 | |
Đoàn Trần Công Danh | 3cacb9a | 2020-04-27 21:22:37 +0700 | [diff] [blame] | 7 | #ifdef GIT_TEST_PROGRESS_ONLY |
| 8 | |
| 9 | extern int progress_testing; |
| 10 | extern uint64_t progress_test_ns; |
| 11 | void progress_test_force_update(void); |
| 12 | |
| 13 | #endif |
| 14 | |
Elijah Newren | d6861d0 | 2017-11-13 12:15:58 -0800 | [diff] [blame] | 15 | void display_throughput(struct progress *progress, uint64_t total); |
SZEDER Gábor | 9219d12 | 2019-04-05 02:45:36 +0200 | [diff] [blame] | 16 | void display_progress(struct progress *progress, uint64_t n); |
Elijah Newren | d6861d0 | 2017-11-13 12:15:58 -0800 | [diff] [blame] | 17 | struct progress *start_progress(const char *title, uint64_t total); |
Jeff Hostetler | 9d81ecb | 2019-03-21 12:36:11 -0700 | [diff] [blame] | 18 | struct progress *start_sparse_progress(const char *title, uint64_t total); |
Elijah Newren | d6861d0 | 2017-11-13 12:15:58 -0800 | [diff] [blame] | 19 | struct progress *start_delayed_progress(const char *title, uint64_t total); |
Jeff Hostetler | 9d81ecb | 2019-03-21 12:36:11 -0700 | [diff] [blame] | 20 | struct progress *start_delayed_sparse_progress(const char *title, |
| 21 | uint64_t total); |
Ævar Arnfjörð Bjarmason | a02014b | 2022-02-03 22:40:15 +0100 | [diff] [blame] | 22 | void stop_progress_msg(struct progress **p_progress, const char *msg); |
Ævar Arnfjörð Bjarmason | 74900a6 | 2022-02-03 22:40:18 +0100 | [diff] [blame] | 23 | static inline void stop_progress(struct progress **p_progress) |
| 24 | { |
| 25 | stop_progress_msg(p_progress, _("done")); |
| 26 | } |
Nicolas Pitre | 96a02f8 | 2007-04-18 14:27:45 -0400 | [diff] [blame] | 27 | #endif |