How to calculate milliseconds,from the code below.
a = datetime.datetime.now() b = datetime.datetime.now() c = b - a >>> c >>> c.days 0 &
milliseconds = (c.days * 24 * 60 * 60 + c.seconds) * 1000 + c.microseconds / 1000.0
Or, new since 2.7:
c.total_seconds()*1000
(https://docs.python.org/2/library/datetime.html)