]> git.sur5r.net Git - bacula/bacula/blob - regress/test_duration
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / test_duration
1 #!/usr/bin/env python2
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6 from time import time as now 
7  
8 t = now()
9 fn = open('testtime.out', 'r')
10 s = fn.readline()     
11 fn.close()
12 diff = t - float(s)
13 h = int(diff / 3600)
14 m = int((diff - h * 3600) / 60)
15 sec = diff - h * 3600 - m * 60
16 print '%02d:%02d:%02d %ds' % (h, m, sec, t-float(s))