]> git.sur5r.net Git - bacula/bacula/commitdiff
Backuport from BEE
authorKern Sibbald <kern@sibbald.com>
Thu, 27 Mar 2014 18:01:41 +0000 (19:01 +0100)
committerKern Sibbald <kern@sibbald.com>
Thu, 27 Mar 2014 18:01:41 +0000 (19:01 +0100)
regress/test_duration [new file with mode: 0755]
regress/test_starttime [new file with mode: 0755]

diff --git a/regress/test_duration b/regress/test_duration
new file mode 100755 (executable)
index 0000000..6a48ad6
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/env python2
+from time import time as now 
+t = now()
+fn = open('testtime.out', 'r')
+s = fn.readline()     
+fn.close()
+diff = t - float(s)
+h = int(diff / 3600)
+m = int((diff - h * 3600) / 60)
+sec = diff - h * 3600 - m * 60
+print '%02d:%02d:%02d %ds' % (h, m, sec, t-float(s))
diff --git a/regress/test_starttime b/regress/test_starttime
new file mode 100755 (executable)
index 0000000..266b724
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+from time import time as now 
+
+fn = open('testtime.out', 'w+')
+fn.write('%s' % now())
+fn.close()