Progress bar and estimated time left prediction for for loops