Go to the documentation of this file.
11 #ifndef PROGRESS_BAR_H
12 #define PROGRESS_BAR_H
29 double update_interval_sec;
void progress_bar_set_part_total(struct ProgressBar *bar, struct ProgressBarPart *part, uint64_t new_total)
Set the total for a part.
Progress bar object.
Definition: progress_bar.h:27
void progress_bar_bind_part(struct ProgressBar *bar, struct ProgressBarPart *part)
Bind a part to the progress bar.
void progress_bar_set_start_time(struct ProgressBar *bar, timestamp_t start_time)
Set the start time for the progress bar.
void progress_bar_delete(struct ProgressBar *bar)
Delete the progress bar and free all parts.
struct ProgressBarPart * progress_bar_create_part(const char *label, uint64_t total)
Create a new part.
UINT64_T timestamp_t
A type to hold the current time, in microseconds since January 1st, 1970.
Definition: timestamp.h:20
void progress_bar_update_part(struct ProgressBar *bar, struct ProgressBarPart *part, uint64_t increment)
Update the current value for a part, redraw if needed.
void progress_bar_finish(struct ProgressBar *bar)
Finish the progress bar: draw once and print a newline.
A part of a progress bar.
Definition: progress_bar.h:20
struct ProgressBar * progress_bar_init(const char *label)
Create a progress bar.
void progress_bar_set_update_interval(struct ProgressBar *bar, double update_interval_sec)
Set the update interval for the progress bar.