From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Tue, 5 Feb 2008 19:16:50 +0000 (+0000) Subject: Print progress every 5 seconds. X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=7d4f5476b3a7e286e36c6bf6bf06727c56a3f58f;p=virt-p2v.git Print progress every 5 seconds. --- diff --git a/virt-p2v b/virt-p2v index 6133595..133cee1 100755 --- a/virt-p2v +++ b/virt-p2v @@ -1491,8 +1491,8 @@ MAC address: %s" let bytes_sent = Int64.add bytes_sent (Int64.of_int n) in let last_printed_at = let now = gettimeofday () in - (* Print progress once per second. *) - if now -. last_printed_at > 1. then ( + (* Print progress every few seconds. *) + if now -. last_printed_at > 5. then ( let elapsed = Int64.to_float bytes_sent /. Int64.to_float size in let secs_elapsed = now -. start in printf "%.0f%%" (100. *. elapsed);