This is probably a very basic question, how do I find out the difference between two system time.
I tried
x1 = t1.clock
x2 = t2.clock
x2 - x1
doesn't seem to give me the difference.
Also trying this way ,
x = time.localtime( )
y = time.localtime( )
tmp_time = str(x[3])+ ':' +str(x[4]) + ':' + str(x[5])
gives me output as 11:34:5 but I cannot find the difference between these two as it gives me the following error
y-x
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for -: 'time.struct_ti me' and 'time.struct_ti me'
Any tips ??
-V
I tried
x1 = t1.clock
x2 = t2.clock
x2 - x1
doesn't seem to give me the difference.
Also trying this way ,
x = time.localtime( )
y = time.localtime( )
tmp_time = str(x[3])+ ':' +str(x[4]) + ':' + str(x[5])
gives me output as 11:34:5 but I cannot find the difference between these two as it gives me the following error
y-x
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for -: 'time.struct_ti me' and 'time.struct_ti me'
Any tips ??
-V
Comment