image_to_live: improve print_time_elapsed display

Move this call to the repeat phase since we call command_completed
at the end (which also prints time info).

BUG=None
TEST=CQ passes

Change-Id: If3cc2e8be4319a95d5eb4596d2ebe6d024670d11
Reviewed-on: https://chromium-review.googlesource.com/1793386
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
diff --git a/image_to_live.sh b/image_to_live.sh
index 13e0cd1..78339b4 100755
--- a/image_to_live.sh
+++ b/image_to_live.sh
@@ -503,7 +503,6 @@
 
   if [ ${FLAGS_reboot_after_update} -eq ${FLAGS_FALSE} ]; then
     echo "Not rebooting because of --noreboot_after_update"
-    print_time_elapsed
     return 0
   fi
 
@@ -532,8 +531,6 @@
     local release_description=$(echo ${REMOTE_OUT} | cut -d '=' -f 2)
     info "Update was successful and rebooted to $release_description"
   fi
-
-  print_time_elapsed
 }
 
 main() {
@@ -556,6 +553,7 @@
     echo "Iteration: " $i of ${FLAGS_repeat}
     run_once
     if [ ${FLAGS_repeat} -gt 1 ]; then
+      print_time_elapsed
       remote_sh "${UPDATER_BIN} --reset_status 2> /dev/null"
     fi
   done