Skip to content

Commit 3ca758c

Browse files
committed
pretty_progress: erase to end of line
1 parent 2eb08ff commit 3ca758c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void pretty_progress(int step, int steps, float time) {
348348
}
349349
}
350350
progress += "|";
351-
printf(time > 1.0f ? "\r%s %i/%i - %.2fs/it" : "\r%s %i/%i - %.2fit/s",
351+
printf(time > 1.0f ? "\r%s %i/%i - %.2fs/it" : "\r%s %i/%i - %.2fit/s\033[K",
352352
progress.c_str(), step, steps,
353353
time > 1.0f || time == 0 ? time : (1.0f / time));
354354
fflush(stdout); // for linux

0 commit comments

Comments
 (0)