pol = True
if GPIO.input(inPut) == 1:
while pol == True:
start_time = time.localtime()
start_time_format = time.strftime("%H:%M:%S:", start_time)
pol == False
else:
pol == True
current_time = time.localtime()
current_time_format = time.strftime("%H:%M:%S:", current_time)
work_time = current_time_format - start_time_format
print work_time
when i run it i got this error
work_time = current_time_format - start_time_format
TypeError: unsupported operand type(s) for -: 'str' and 'str'
how can i subtract current_time_format
from start_time_format
?
any correction for this ?
thanks in advance