[demo] Display how much time the run took
authorSimon Chabot <simon.chabot@logilab.fr>
Thu, 08 Nov 2012 14:44:08 +0100
changeset 97 f70fb53a019e
parent 96 0a63b9d4024e
child 98 20f79a013965
[demo] Display how much time the run took
demo.py
--- a/demo.py	Thu Nov 08 14:43:32 2012 +0100
+++ b/demo.py	Thu Nov 08 14:44:08 2012 +0100
@@ -117,8 +117,10 @@
 
 if __name__ == '__main__':
     import sys
+    from time import time
     runall = (len(sys.argv) == 1)
 
+    t = time()
     if runall or '0' in sys.argv:
         print "Running demo_0"
         demo_0()
@@ -133,3 +135,4 @@
         demo_2()
 
     print "Demo terminated"
+    print "Took %d min" % ((time() - t) / 60)