
Jerry Van Baren schrieb:
Michael Schwingen wrote:
Wolfgang Denk wrote:
Please let's stay terse. Printing a dot is a single character on the console. I dislike funny stuff which requires output of non-printing characters or (weven worse!) terminal specific escape sequences.
Backspace or CR without LF should work on all terminals, no?
No matter how it is implemented, I am strongly in favor of *some* kind of progress output.
If it is possible to estimate how long the operation will take, this would be a big plus IMHO (which precludes the simple dots).
Hi Michael, Stefan, Wolfgang,
I understand where you are coming from and like countdowns a lot when driving the system from a terminal.
The dark side of countdowns with \r characters is if you capture it in a log file. It isn't impossibly bad, but you end up with a lot of crap in your log file.
The dark side of dots, as you point out, is that you don't know how many dots are suppose to print, at least the first couple of times you do it.
Here is a thought, what about printing a bar and then print the dots. How sophisticated is our printf() formatting capabilities? Hmmm. How about something like this (I think the?
ACK from my side to Jerry's version. Maybe a quite long fixed length (~40 characters) bar would also be reasonable and the dot-time scaled to fit the progress.
A progress bar needs IMO two informations: - that it's still working... so a quite frequent output of something to keep me calm. - how long it will take... so I know how much time I will have to get the next cup of coffee to keep me tickin'.
Perfect (= close to overkill, I know) would be IMO an additional output like:
Programming Flash from 0xc0ldbeef to 0xc0ldcafe takes 112s. ................. |
So, I don't need to estimate from the first dots how long it will take to complete.
Regards,
Clemens