# %%
import datetime
from dateutil.relativedelta import relativedelta
#------------------------------------------------------------------------------------------------
#BEGIN Time
t_aFull=""
t_bFull=""
def diff(t_bFull, t_aFull):
t_diffFull = relativedelta(t_bFull,t_aFull) # later/end time comes first!
return '{h}h {m}m {s}s'.format(h=t_diffFull.hours, m=t_diffFull.minutes, s=t_diffFull.seconds)
t_aFull = datetime.datetime.now()
print("========================== ")
print("Time Starting: ",t_aFull)
print("==========================")
#------------------------------------------------------------------------------------------------
########################################Script Body##############################################
# %%
#------------------------------------------------------------------------------------------------
#Script de Tempo End
t_bFull = datetime.datetime.now()
#diff(t_bFull,t_aFull)
print("========================== ")
print("Time Finish: ",t_bFull)
print("==========================")
print("Time Total: ",diff(t_aFull,t_bFull))
print("==========================")
#------------------------------------------------------------------------------------------------
No comments:
Post a Comment