1>>> import datetime
2>>> a = datetime.datetime.now()
3>>> b = datetime.datetime.now()
4>>> c = b - a
5
6>>> c
7datetime.timedelta(0, 4, 316543)
8>>> c.days
90
10>>> c.seconds
114
12>>> c.microseconds
13316543
1>>> import datetime
2>>> a = datetime.datetime.now()
3>>> b = datetime.datetime.now()
4>>> delta = b - a
5>>> print delta
60:00:05.077263
7>>> int(delta.total_seconds() * 1000) # milliseconds
85077
9