progress.h 768 B

12345678910111213141516171819202122232425
  1. #ifndef PROGRESS_H
  2. #define PROGRESS_H
  3. struct progress;
  4. #ifdef GIT_TEST_PROGRESS_ONLY
  5. extern int progress_testing;
  6. extern uint64_t progress_test_ns;
  7. void progress_test_force_update(void);
  8. #endif
  9. void display_throughput(struct progress *progress, uint64_t total);
  10. void display_progress(struct progress *progress, uint64_t n);
  11. struct progress *start_progress(const char *title, uint64_t total);
  12. struct progress *start_sparse_progress(const char *title, uint64_t total);
  13. struct progress *start_delayed_progress(const char *title, uint64_t total);
  14. struct progress *start_delayed_sparse_progress(const char *title,
  15. uint64_t total);
  16. void stop_progress(struct progress **progress);
  17. void stop_progress_msg(struct progress **progress, const char *msg);
  18. #endif