build_images.py: less verbose about download, just writing the time it took

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
diff --git a/build_images.py b/build_images.py
index 2b3d5ed..be77fff 100755
--- a/build_images.py
+++ b/build_images.py
@@ -29,6 +29,7 @@
 import argparse
 import bz2
 import datetime
+import time
 import hashlib
 import os
 import re
@@ -79,6 +80,15 @@
     d = datetime.date.today()
     return "%d%02d%02d" % (d.year, d.month, d.day)
 
+def download(dm, url):
+    print "INFO: Fetching", url
+    before = time.time()
+    dfile = dm.download(url, None, verbose=False)
+    delta_min, delta_secs = divmod(int(time.time() - before), 60)
+    print "INFO: Downloaded file '%s' in %d min(s) and %d sec(s)" % (
+                    dfile, delta_min, delta_secs)
+    return dfile
+
 def compress_image(imgfile):
     print "compressing %s" % imgfile
     args = ('bzip2', imgfile)
@@ -277,12 +287,12 @@
                       ", skipping pre-built image for it" % (hwpack)
 
         if url is not None and url is not False:
-            hwpf = dm.download(url, None)
+            hwpf = download(dm, url)
             for binary in binaries:
                 # create the image and metadata
                 imgfile = site.get_image_name(odir, hwpack, url, binary)
                 infofile = '%s.html' % os.path.splitext(imgfile)[0]
-                rfsf = dm.download(binaryf[binary], None)
+                rfsf = download(dm, binaryf[binary])
                 build_image(lmc, imgfile, hwpack, hwpf, binary, rfsf)
                 bz2file = compress_image(imgfile)
                 zsync_image(bz2file)