Skip to content

Commit 736498c

Browse files
Update to progress bar time_to_report function
1 parent a40107a commit 736498c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smithlab_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ class ProgressBar {
429429
bar = std::string(bar_width, ' ');
430430
}
431431
bool time_to_report(const size_t i) const {
432-
return (static_cast<size_t>((100.0*i)/total) > prev);
432+
return std::round((100.0*std::min(i, total))/total) > prev;
433433
}
434434
void
435435
report(std::ostream &out, const size_t i);

0 commit comments

Comments
 (0)