Python Calculate Time between two time stamps.
timeprovides various time related functions.
time.sleep()Suspend execution of the calling thread for the given number of seconds.
datetimemodule to work with dates as date objects.
from datetime import datetime import time
date1 = datetime.datetime(2021, 6, 1) date2 = datetime.datetime.now() diff = date2 - date1 print(diff)
15 days, 18:05:48.305102