1>>> import datetime
2>>> time1 = datetime.datetime.now()
3>>> time2 = datetime.datetime.now() # waited a few minutes before pressing enter
4>>> elapsedTime = time2 - time1
5>>> elapsedTime
6datetime.timedelta(0, 125, 749430)
7>>> divmod(elapsedTime.total_seconds(), 60)
8(2.0, 5.749430000000004) # divmod returns quotient and remainder
9# 2 minutes, 5.74943 seconds
10