dotimes-with-progress-reporter

dotimes-with-progress-reporter is a Lisp macro in `subr.el'.

(dotimes-with-progress-reporter (VAR COUNT [RESULT]) MESSAGE BODY...)

Loop a certain number of times and report progress in the echo area.
Evaluate BODY with VAR bound to successive integers running from
0, inclusive, to COUNT, exclusive. Then evaluate RESULT to get
the return value (nil if RESULT is omitted).

At each iteration MESSAGE followed by progress percentage is
printed in the echo area. After the loop is finished, MESSAGE
followed by word "done" is printed. This macro is a
convenience wrapper around `make-progress-reporter' and friends.