import time
import datetime
start = datetime.datetime.now()
time.sleep(5)
end = datetime.datetime.now()
print((end - start).seconds) # 5
import time
import datetime
start = datetime.datetime.now()
time.sleep(5)
end = datetime.datetime.now()
print((end - start).seconds) # 5