Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get time difference in milliseconds

>>> import datetime
>>> a = datetime.datetime.now()
>>> b = datetime.datetime.now()
>>> delta = b - a
>>> print delta
0:00:05.077263
>>> int(delta.total_seconds() * 1000) # milliseconds
5077
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #time #difference #milliseconds
ADD COMMENT
Topic
Name
3+6 =